mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mm/migrate: Add native folio functions
@ 2026-06-08  0:12 yahia
  2026-06-08  0:29 ` Zi Yan
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: yahia @ 2026-06-08  0:12 UTC (permalink / raw)
  To: akpm; +Cc: david, ziy, linux-mm, linux-kernel, yahia

Hello,

I aim provides in this patch to provide native
folio abstractions for page functions like movable_ops
by wrapping folio->page structure in the native page function

Signed-off-by: yahia <yahia.a.abdrabou@gmail.com>
---
 include/linux/page-flags.h | 7 +++++++
 mm/migrate.c               | 5 +++++
 2 files changed, 12 insertions(+)

diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 7223f6f4e2b4..6776cf821edd 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -1110,6 +1110,7 @@ bool is_free_buddy_page(const struct page *page);
  */
 TESTPAGEFLAG(MovableOps, movable_ops, PF_NO_TAIL);
 SETPAGEFLAG(MovableOps, movable_ops, PF_NO_TAIL);
+FOLIO_TEST_FLAG(MovableOpsIsolated, movable_ops_isolated)
 /*
  * A movable_ops page has this flag set while it is isolated for migration.
  * This flag primarily protects against concurrent migration attempts.
@@ -1139,6 +1140,12 @@ static inline bool page_has_movable_ops(const struct page *page)
 	       (PageOffline(page) || PageZsmalloc(page));
 }
 
+static inline bool folio_has_movable_ops(struct folio *folio)
+{
+	return PageMovableOps(&folio->page) &&
+		(PageOffline(&folio->page) || PageZsmalloc(&folio->page));
+}
+
 static __always_inline int PageAnonExclusive(const struct page *page)
 {
 	VM_BUG_ON_PGFLAGS(!PageAnon(page), page);
diff --git a/mm/migrate.c b/mm/migrate.c
index 8a64291ab5b4..817a8c0b84d9 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -96,6 +96,11 @@ static const struct movable_operations *page_movable_ops(struct page *page)
 	return NULL;
 }
 
+static const struct movable_operations *folio_movable_ops(struct folio *folio)
+{
+	return page_movable_ops(&folio->page);
+}
+
 /**
  * isolate_movable_ops_page - isolate a movable_ops page for migration
  * @page: The page.
-- 
2.54.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mm/migrate: Add native folio functions
  2026-06-08  0:12 [PATCH] mm/migrate: Add native folio functions yahia
@ 2026-06-08  0:29 ` Zi Yan
  2026-06-08 16:46   ` David Hildenbrand (Arm)
  2026-06-08  3:18 ` kernel test robot
  2026-06-08  4:29 ` kernel test robot
  2 siblings, 1 reply; 5+ messages in thread
From: Zi Yan @ 2026-06-08  0:29 UTC (permalink / raw)
  To: yahia; +Cc: akpm, david, linux-mm, linux-kernel

On 7 Jun 2026, at 20:12, yahia wrote:

> Hello,
>
> I aim provides in this patch to provide native
> folio abstractions for page functions like movable_ops
> by wrapping folio->page structure in the native page function

MovableOps and MovableOpsIsolated pages are not folios and they
are supposed to only be order-0 pages. This patch is unnecessary.

Please read the original patchset for more details[1].

[1] https://lore.kernel.org/all/20250704102524.326966-1-david@redhat.com/

>
> Signed-off-by: yahia <yahia.a.abdrabou@gmail.com>
> ---
>  include/linux/page-flags.h | 7 +++++++
>  mm/migrate.c               | 5 +++++
>  2 files changed, 12 insertions(+)
>
> diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
> index 7223f6f4e2b4..6776cf821edd 100644
> --- a/include/linux/page-flags.h
> +++ b/include/linux/page-flags.h
> @@ -1110,6 +1110,7 @@ bool is_free_buddy_page(const struct page *page);
>   */
>  TESTPAGEFLAG(MovableOps, movable_ops, PF_NO_TAIL);
>  SETPAGEFLAG(MovableOps, movable_ops, PF_NO_TAIL);
> +FOLIO_TEST_FLAG(MovableOpsIsolated, movable_ops_isolated)
>  /*
>   * A movable_ops page has this flag set while it is isolated for migration.
>   * This flag primarily protects against concurrent migration attempts.
> @@ -1139,6 +1140,12 @@ static inline bool page_has_movable_ops(const struct page *page)
>  	       (PageOffline(page) || PageZsmalloc(page));
>  }
>
> +static inline bool folio_has_movable_ops(struct folio *folio)
> +{
> +	return PageMovableOps(&folio->page) &&
> +		(PageOffline(&folio->page) || PageZsmalloc(&folio->page));
> +}
> +
>  static __always_inline int PageAnonExclusive(const struct page *page)
>  {
>  	VM_BUG_ON_PGFLAGS(!PageAnon(page), page);
> diff --git a/mm/migrate.c b/mm/migrate.c
> index 8a64291ab5b4..817a8c0b84d9 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -96,6 +96,11 @@ static const struct movable_operations *page_movable_ops(struct page *page)
>  	return NULL;
>  }
>
> +static const struct movable_operations *folio_movable_ops(struct folio *folio)
> +{
> +	return page_movable_ops(&folio->page);
> +}
> +
>  /**
>   * isolate_movable_ops_page - isolate a movable_ops page for migration
>   * @page: The page.
> -- 
> 2.54.0


--
Best Regards,
Yan, Zi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mm/migrate: Add native folio functions
  2026-06-08  0:12 [PATCH] mm/migrate: Add native folio functions yahia
  2026-06-08  0:29 ` Zi Yan
@ 2026-06-08  3:18 ` kernel test robot
  2026-06-08  4:29 ` kernel test robot
  2 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2026-06-08  3:18 UTC (permalink / raw)
  To: yahia, akpm; +Cc: oe-kbuild-all, david, ziy, linux-mm, linux-kernel, yahia

Hi yahia,

kernel test robot noticed the following build errors:

[auto build test ERROR on akpm-mm/mm-everything]

url:    https://github.com/intel-lab-lkp/linux/commits/yahia/mm-migrate-Add-native-folio-functions/20260608-081741
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/20260608001251.66847-1-yahia.a.abdrabou%40gmail.com
patch subject: [PATCH] mm/migrate: Add native folio functions
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20260608/202606080542.ER5s80Rl-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project f43d6834093b19baf79beda8c0337ab020ac5f17)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260608/202606080542.ER5s80Rl-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606080542.ER5s80Rl-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:18:
   In file included from include/linux/slab.h:17:
   In file included from include/linux/gfp.h:7:
   In file included from include/linux/mmzone.h:23:
>> include/linux/page-flags.h:1113:1: error: use of undeclared identifier 'PG_MovableOpsIsolated'; did you mean 'PG_movable_ops_isolated'?
    1113 | FOLIO_TEST_FLAG(MovableOpsIsolated, movable_ops_isolated)
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/page-flags.h:412:19: note: expanded from macro 'FOLIO_TEST_FLAG'
     412 | { return test_bit(PG_##name, const_folio_flags(folio, page)); }
         |                   ^~~~~~~~~
   <scratch space>:185:1: note: expanded from here
     185 | PG_MovableOpsIsolated
         | ^~~~~~~~~~~~~~~~~~~~~
   include/linux/page-flags.h:172:2: note: 'PG_movable_ops_isolated' declared here
     172 |         PG_movable_ops_isolated = PG_reclaim,
         |         ^
>> include/linux/page-flags.h:1113:37: error: use of undeclared identifier 'movable_ops_isolated'; did you mean 'PG_movable_ops_isolated'?
    1113 | FOLIO_TEST_FLAG(MovableOpsIsolated, movable_ops_isolated)
         |                                     ^~~~~~~~~~~~~~~~~~~~
         |                                     PG_movable_ops_isolated
   include/linux/page-flags.h:412:55: note: expanded from macro 'FOLIO_TEST_FLAG'
     412 | { return test_bit(PG_##name, const_folio_flags(folio, page)); }
         |                                                       ^~~~
   include/linux/bitops.h:60:50: note: expanded from macro 'test_bit'
      60 | #define test_bit(nr, addr)              bitop(_test_bit, nr, addr)
         |                                                              ^~~~
   include/linux/bitops.h:44:37: note: expanded from macro 'bitop'
      44 |           __builtin_constant_p((uintptr_t)(addr) != (uintptr_t)NULL) && \
         |                                            ^~~~
   include/linux/page-flags.h:172:2: note: 'PG_movable_ops_isolated' declared here
     172 |         PG_movable_ops_isolated = PG_reclaim,
         |         ^
>> include/linux/page-flags.h:1113:37: error: use of undeclared identifier 'movable_ops_isolated'; did you mean 'PG_movable_ops_isolated'?
    1113 | FOLIO_TEST_FLAG(MovableOpsIsolated, movable_ops_isolated)
         |                                     ^~~~~~~~~~~~~~~~~~~~
         |                                     PG_movable_ops_isolated
   include/linux/page-flags.h:412:55: note: expanded from macro 'FOLIO_TEST_FLAG'
     412 | { return test_bit(PG_##name, const_folio_flags(folio, page)); }
         |                                                       ^~~~
   include/linux/bitops.h:60:50: note: expanded from macro 'test_bit'
      60 | #define test_bit(nr, addr)              bitop(_test_bit, nr, addr)
         |                                                              ^~~~
   include/linux/bitops.h:45:16: note: expanded from macro 'bitop'
      45 |           (uintptr_t)(addr) != (uintptr_t)NULL &&                       \
         |                       ^~~~
   include/linux/page-flags.h:172:2: note: 'PG_movable_ops_isolated' declared here
     172 |         PG_movable_ops_isolated = PG_reclaim,
         |         ^
>> include/linux/page-flags.h:1113:37: error: use of undeclared identifier 'movable_ops_isolated'; did you mean 'PG_movable_ops_isolated'?
    1113 | FOLIO_TEST_FLAG(MovableOpsIsolated, movable_ops_isolated)
         |                                     ^~~~~~~~~~~~~~~~~~~~
         |                                     PG_movable_ops_isolated
   include/linux/page-flags.h:412:55: note: expanded from macro 'FOLIO_TEST_FLAG'
     412 | { return test_bit(PG_##name, const_folio_flags(folio, page)); }
         |                                                       ^~~~
   include/linux/bitops.h:60:50: note: expanded from macro 'test_bit'
      60 | #define test_bit(nr, addr)              bitop(_test_bit, nr, addr)
         |                                                              ^~~~
   include/linux/bitops.h:46:50: note: expanded from macro 'bitop'
      46 |           __builtin_constant_p(*(const unsigned long *)(addr))) ?       \
         |                                                         ^~~~
   include/linux/page-flags.h:172:2: note: 'PG_movable_ops_isolated' declared here
     172 |         PG_movable_ops_isolated = PG_reclaim,
         |         ^
>> include/linux/page-flags.h:1113:1: error: use of undeclared identifier 'PG_MovableOpsIsolated'; did you mean 'PG_movable_ops_isolated'?
    1113 | FOLIO_TEST_FLAG(MovableOpsIsolated, movable_ops_isolated)
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/page-flags.h:412:19: note: expanded from macro 'FOLIO_TEST_FLAG'
     412 | { return test_bit(PG_##name, const_folio_flags(folio, page)); }
         |                   ^~~~~~~~~
   <scratch space>:185:1: note: expanded from here
     185 | PG_MovableOpsIsolated
         | ^~~~~~~~~~~~~~~~~~~~~
   include/linux/page-flags.h:172:2: note: 'PG_movable_ops_isolated' declared here
     172 |         PG_movable_ops_isolated = PG_reclaim,
         |         ^
>> include/linux/page-flags.h:1113:37: error: use of undeclared identifier 'movable_ops_isolated'; did you mean 'PG_movable_ops_isolated'?
    1113 | FOLIO_TEST_FLAG(MovableOpsIsolated, movable_ops_isolated)
         |                                     ^~~~~~~~~~~~~~~~~~~~
         |                                     PG_movable_ops_isolated
   include/linux/page-flags.h:412:55: note: expanded from macro 'FOLIO_TEST_FLAG'
     412 | { return test_bit(PG_##name, const_folio_flags(folio, page)); }
         |                                                       ^~~~
   include/linux/bitops.h:60:50: note: expanded from macro 'test_bit'
      60 | #define test_bit(nr, addr)              bitop(_test_bit, nr, addr)
         |                                                              ^~~~
   include/linux/bitops.h:47:17: note: expanded from macro 'bitop'
      47 |          const##op(nr, addr) : op(nr, addr))
         |                        ^~~~
   include/linux/page-flags.h:172:2: note: 'PG_movable_ops_isolated' declared here
     172 |         PG_movable_ops_isolated = PG_reclaim,
         |         ^
>> include/linux/page-flags.h:1113:1: error: use of undeclared identifier 'PG_MovableOpsIsolated'; did you mean 'PG_movable_ops_isolated'?
    1113 | FOLIO_TEST_FLAG(MovableOpsIsolated, movable_ops_isolated)
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/page-flags.h:412:19: note: expanded from macro 'FOLIO_TEST_FLAG'
     412 | { return test_bit(PG_##name, const_folio_flags(folio, page)); }
         |                   ^~~~~~~~~
   <scratch space>:185:1: note: expanded from here
     185 | PG_MovableOpsIsolated
         | ^~~~~~~~~~~~~~~~~~~~~
   include/linux/page-flags.h:172:2: note: 'PG_movable_ops_isolated' declared here
     172 |         PG_movable_ops_isolated = PG_reclaim,
         |         ^
>> include/linux/page-flags.h:1113:37: error: use of undeclared identifier 'movable_ops_isolated'; did you mean 'PG_movable_ops_isolated'?
    1113 | FOLIO_TEST_FLAG(MovableOpsIsolated, movable_ops_isolated)
         |                                     ^~~~~~~~~~~~~~~~~~~~
         |                                     PG_movable_ops_isolated
   include/linux/page-flags.h:412:55: note: expanded from macro 'FOLIO_TEST_FLAG'
     412 | { return test_bit(PG_##name, const_folio_flags(folio, page)); }
         |                                                       ^~~~
   include/linux/bitops.h:60:50: note: expanded from macro 'test_bit'
      60 | #define test_bit(nr, addr)              bitop(_test_bit, nr, addr)
         |                                                              ^~~~
   include/linux/bitops.h:47:32: note: expanded from macro 'bitop'
      47 |          const##op(nr, addr) : op(nr, addr))
         |                                       ^~~~
   include/linux/page-flags.h:172:2: note: 'PG_movable_ops_isolated' declared here
     172 |         PG_movable_ops_isolated = PG_reclaim,
         |         ^
   In file included from arch/x86/kernel/asm-offsets.c:14:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:17:
   In file included from include/linux/fs.h:5:
   In file included from include/linux/fs/super.h:5:
   In file included from include/linux/fs/super_types.h:13:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:98:11: warning: array index 3 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
      98 |                 return (set->sig[3] | set->sig[2] |
         |                         ^        ~
   arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
      24 |         unsigned long sig[_NSIG_WORDS];
         |         ^
   In file included from arch/x86/kernel/asm-offsets.c:14:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:17:
   In file included from include/linux/fs.h:5:
   In file included from include/linux/fs/super.h:5:
   In file included from include/linux/fs/super_types.h:13:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:98:25: warning: array index 2 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
      98 |                 return (set->sig[3] | set->sig[2] |
         |                                       ^        ~
   arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
      24 |         unsigned long sig[_NSIG_WORDS];
         |         ^
   In file included from arch/x86/kernel/asm-offsets.c:14:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:17:
   In file included from include/linux/fs.h:5:
   In file included from include/linux/fs/super.h:5:
   In file included from include/linux/fs/super_types.h:13:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:99:4: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
      99 |                         set->sig[1] | set->sig[0]) == 0;
         |                         ^        ~
   arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
      24 |         unsigned long sig[_NSIG_WORDS];
         |         ^
   In file included from arch/x86/kernel/asm-offsets.c:14:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:17:
   In file included from include/linux/fs.h:5:
   In file included from include/linux/fs/super.h:5:
   In file included from include/linux/fs/super_types.h:13:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:101:11: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
     101 |                 return (set->sig[1] | set->sig[0]) == 0;
         |                         ^        ~
   arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
      24 |         unsigned long sig[_NSIG_WORDS];
         |         ^
   In file included from arch/x86/kernel/asm-offsets.c:14:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:17:
   In file included from include/linux/fs.h:5:
   In file included from include/linux/fs/super.h:5:
   In file included from include/linux/fs/super_types.h:13:
   In file included from include/linux/percpu-rwsem.h:7:
   In file included from include/linux/rcuwait.h:6:
   In file included from include/linux/sched/signal.h:6:
   include/linux/signal.h:114:11: warning: array index 3 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
     114 |                 return  (set1->sig[3] == set2->sig[3]) &&
         |                          ^         ~
   arch/x86/include/asm/signal.h:24:2: note: array 'sig' declared here
      24 |         unsigned long sig[_NSIG_WORDS];
         |         ^


vim +1113 include/linux/page-flags.h

  1093	
  1094	#ifdef CONFIG_MIGRATION
  1095	/*
  1096	 * This page is migratable through movable_ops (for selected typed pages
  1097	 * only).
  1098	 *
  1099	 * Page migration of such pages might fail, for example, if the page is
  1100	 * already isolated by somebody else, or if the page is about to get freed.
  1101	 *
  1102	 * While a subsystem might set selected typed pages that support page migration
  1103	 * as being movable through movable_ops, it must never clear this flag.
  1104	 *
  1105	 * This flag is only cleared when the page is freed back to the buddy.
  1106	 *
  1107	 * Only selected page types support this flag (see page_movable_ops()) and
  1108	 * the flag might be used in other context for other pages. Always use
  1109	 * page_has_movable_ops() instead.
  1110	 */
  1111	TESTPAGEFLAG(MovableOps, movable_ops, PF_NO_TAIL);
  1112	SETPAGEFLAG(MovableOps, movable_ops, PF_NO_TAIL);
> 1113	FOLIO_TEST_FLAG(MovableOpsIsolated, movable_ops_isolated)
  1114	/*
  1115	 * A movable_ops page has this flag set while it is isolated for migration.
  1116	 * This flag primarily protects against concurrent migration attempts.
  1117	 *
  1118	 * Once migration ended (success or failure), the flag is cleared. The
  1119	 * flag is managed by the migration core.
  1120	 */
  1121	PAGEFLAG(MovableOpsIsolated, movable_ops_isolated, PF_NO_TAIL);
  1122	#else /* !CONFIG_MIGRATION */
  1123	TESTPAGEFLAG_FALSE(MovableOps, movable_ops);
  1124	SETPAGEFLAG_NOOP(MovableOps, movable_ops);
  1125	PAGEFLAG_FALSE(MovableOpsIsolated, movable_ops_isolated);
  1126	#endif /* CONFIG_MIGRATION */
  1127	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mm/migrate: Add native folio functions
  2026-06-08  0:12 [PATCH] mm/migrate: Add native folio functions yahia
  2026-06-08  0:29 ` Zi Yan
  2026-06-08  3:18 ` kernel test robot
@ 2026-06-08  4:29 ` kernel test robot
  2 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2026-06-08  4:29 UTC (permalink / raw)
  To: yahia, akpm; +Cc: oe-kbuild-all, david, ziy, linux-mm, linux-kernel, yahia

Hi yahia,

kernel test robot noticed the following build errors:

[auto build test ERROR on akpm-mm/mm-everything]

url:    https://github.com/intel-lab-lkp/linux/commits/yahia/mm-migrate-Add-native-folio-functions/20260608-081741
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/20260608001251.66847-1-yahia.a.abdrabou%40gmail.com
patch subject: [PATCH] mm/migrate: Add native folio functions
config: i386-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260608/202606080649.AbjPE8ud-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260608/202606080649.AbjPE8ud-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606080649.AbjPE8ud-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from ./include/linux/bitmap.h:8,
                    from ./include/linux/cpumask.h:11,
                    from ./arch/x86/include/asm/paravirt.h:19,
                    from ./arch/x86/include/asm/irqflags.h:100,
                    from ./include/linux/irqflags.h:18,
                    from ./include/linux/spinlock.h:59,
                    from ./include/linux/swait.h:7,
                    from ./include/linux/completion.h:12,
                    from ./include/linux/crypto.h:15,
                    from arch/x86/kernel/asm-offsets.c:9:
   ./include/linux/page-flags.h: In function 'folio_test_MovableOpsIsolated':
>> ./include/linux/page-flags.h:412:19: error: 'PG_MovableOpsIsolated' undeclared (first use in this function); did you mean 'PG_movable_ops_isolated'?
     412 | { return test_bit(PG_##name, const_folio_flags(folio, page)); }
         |                   ^~~
   ./include/linux/bitops.h:43:32: note: in definition of macro 'bitop'
      43 |         ((__builtin_constant_p(nr) &&                                   \
         |                                ^~
   ./include/linux/page-flags.h:412:10: note: in expansion of macro 'test_bit'
     412 | { return test_bit(PG_##name, const_folio_flags(folio, page)); }
         |          ^~~~~~~~
   ./include/linux/page-flags.h:1113:1: note: in expansion of macro 'FOLIO_TEST_FLAG'
    1113 | FOLIO_TEST_FLAG(MovableOpsIsolated, movable_ops_isolated)
         | ^~~~~~~~~~~~~~~
   ./include/linux/page-flags.h:412:19: note: each undeclared identifier is reported only once for each function it appears in
     412 | { return test_bit(PG_##name, const_folio_flags(folio, page)); }
         |                   ^~~
   ./include/linux/bitops.h:43:32: note: in definition of macro 'bitop'
      43 |         ((__builtin_constant_p(nr) &&                                   \
         |                                ^~
   ./include/linux/page-flags.h:412:10: note: in expansion of macro 'test_bit'
     412 | { return test_bit(PG_##name, const_folio_flags(folio, page)); }
         |          ^~~~~~~~
   ./include/linux/page-flags.h:1113:1: note: in expansion of macro 'FOLIO_TEST_FLAG'
    1113 | FOLIO_TEST_FLAG(MovableOpsIsolated, movable_ops_isolated)
         | ^~~~~~~~~~~~~~~
>> ./include/linux/page-flags.h:1113:37: error: 'movable_ops_isolated' undeclared (first use in this function); did you mean 'PG_movable_ops_isolated'?
    1113 | FOLIO_TEST_FLAG(MovableOpsIsolated, movable_ops_isolated)
         |                                     ^~~~~~~~~~~~~~~~~~~~
   ./include/linux/bitops.h:44:44: note: in definition of macro 'bitop'
      44 |           __builtin_constant_p((uintptr_t)(addr) != (uintptr_t)NULL) && \
         |                                            ^~~~
   ./include/linux/page-flags.h:412:10: note: in expansion of macro 'test_bit'
     412 | { return test_bit(PG_##name, const_folio_flags(folio, page)); }
         |          ^~~~~~~~
   ./include/linux/page-flags.h:1113:1: note: in expansion of macro 'FOLIO_TEST_FLAG'
    1113 | FOLIO_TEST_FLAG(MovableOpsIsolated, movable_ops_isolated)
         | ^~~~~~~~~~~~~~~


vim +412 ./include/linux/page-flags.h

dfbac6dc68bae9 Matthew Wilcox (Oracle  2024-02-27  406) 
f94a62e910840b Christoph Lameter       2008-04-28  407  /*
f94a62e910840b Christoph Lameter       2008-04-28  408   * Macros to create function definitions for page flags
f94a62e910840b Christoph Lameter       2008-04-28  409   */
dfbac6dc68bae9 Matthew Wilcox (Oracle  2024-02-27  410) #define FOLIO_TEST_FLAG(name, page)					\
ce3467af6bded1 Matthew Wilcox (Oracle  2024-02-27  411) static __always_inline bool folio_test_##name(const struct folio *folio) \
ce3467af6bded1 Matthew Wilcox (Oracle  2024-02-27 @412) { return test_bit(PG_##name, const_folio_flags(folio, page)); }
dfbac6dc68bae9 Matthew Wilcox (Oracle  2024-02-27  413) 

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mm/migrate: Add native folio functions
  2026-06-08  0:29 ` Zi Yan
@ 2026-06-08 16:46   ` David Hildenbrand (Arm)
  0 siblings, 0 replies; 5+ messages in thread
From: David Hildenbrand (Arm) @ 2026-06-08 16:46 UTC (permalink / raw)
  To: Zi Yan, yahia; +Cc: akpm, linux-mm, linux-kernel

On 6/8/26 02:29, Zi Yan wrote:
> On 7 Jun 2026, at 20:12, yahia wrote:
> 
>> Hello,
>>
>> I aim provides in this patch to provide native
>> folio abstractions for page functions like movable_ops
>> by wrapping folio->page structure in the native page function
> 
> MovableOps and MovableOpsIsolated pages are not folios and they
> are supposed to only be order-0 pages. This patch is unnecessary.

Yes, it's the wrong thing to do, thanks!

-- 
Cheers,

David

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-06-08 16:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-08  0:12 [PATCH] mm/migrate: Add native folio functions yahia
2026-06-08  0:29 ` Zi Yan
2026-06-08 16:46   ` David Hildenbrand (Arm)
2026-06-08  3:18 ` kernel test robot
2026-06-08  4:29 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome