Skip to contentSkip to conversation

mm/pageblock: improve readability of some pageblock handling

PATCH Superseded Wei Yang 5 participants 12 messages Aug 27, 2025

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Wei Yang

author
#0 lore raw

v2 cover mm/pageblock: improve readability of some pageblock handling

During code reading, found two possible points to improve the readability of pageblock handling.

Patch 1: isolate bit is standalone and there are dedicated helpers. Instead of check the bit directly, we could use the helper to do it.

Patch 2: remove PB_migratetype_bits and PB_migrate_end to reduce magical computation.

v1->v2:
remove PB_migratetype_bits and PB_migrate_end

Wei Yang (2):
mm/page_alloc: use xxx_pageblock_isolate() for better reading mm/pageblock-flags: remove PB_migratetype_bits/PB_migrate_end

 include/linux/pageblock-flags.h | 12 +++++-------
 mm/page_alloc.c                 | 11 +++++------
 2 files changed, 10 insertions(+), 13 deletions(-)
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH v2 1/2 mm/page_alloc: use xxx_pageblock_isolate() for better reading

Since commit e904bce2d9d4 ("mm/page_isolation: make page isolation a standalone bit"), it provides dedicated helper to handle isolation.

Change to use these helpers to be better reading.

No functional change intended.

---
 mm/page_alloc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
mm/page_alloc.c +3 -4
index baead29b3e67..e534f31a6b39 100644
@@ -538,8 +538,7 @@ static void set_pageblock_migratetype(struct page *page,
 			"Use set_pageblock_isolate() for pageblock isolation");
 		return;
 	}
-	VM_WARN_ONCE(get_pfnblock_bit(page, page_to_pfn(page),
-				      PB_migrate_isolate),
+	VM_WARN_ONCE(get_pageblock_isolate(page),
 		     "Use clear_pageblock_isolate() to unisolate pageblock");
 	/* MIGRATETYPE_AND_ISO_MASK clears PB_migrate_isolate if it is set */
 #endif
@@ -2058,9 +2057,9 @@ static unsigned long find_large_buddy(unsigned long start_pfn)
 static inline void toggle_pageblock_isolate(struct page *page, bool isolate)
 {
 	if (isolate)
-		set_pfnblock_bit(page, page_to_pfn(page), PB_migrate_isolate);
+		set_pageblock_isolate(page);
 	else
-		clear_pfnblock_bit(page, page_to_pfn(page), PB_migrate_isolate);
+		clear_pageblock_isolate(page);
 }
 
 /**
Signature · 1 line
2.34.1
Acked-by on v2 1/2
#2 lore raw

Re: [Patch v2 1/2] mm/page_alloc: use xxx_pageblock_isolate() for better reading

Quoted 5 lines · Wei Yang

Since commit e904bce2d9d4 ("mm/page_isolation: make page isolation a standalone bit"), it provides dedicated helper to handle isolation.

Change to use these helpers to be better reading.

Quoted 8 lines

No functional change intended.

Quoted 30 lines
---
 mm/page_alloc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
mm/page_alloc.c +3 -4
index baead29b3e67..e534f31a6b39 100644
@@ -538,8 +538,7 @@ static void set_pageblock_migratetype(struct page *page,
 			"Use set_pageblock_isolate() for pageblock isolation");
 		return;
 	}
-	VM_WARN_ONCE(get_pfnblock_bit(page, page_to_pfn(page),
-				      PB_migrate_isolate),
+	VM_WARN_ONCE(get_pageblock_isolate(page),
 		     "Use clear_pageblock_isolate() to unisolate pageblock");
 	/* MIGRATETYPE_AND_ISO_MASK clears PB_migrate_isolate if it is set */
 #endif
@@ -2058,9 +2057,9 @@ static unsigned long find_large_buddy(unsigned long start_pfn)
 static inline void toggle_pageblock_isolate(struct page *page, bool isolate)
 {
 	if (isolate)
-		set_pfnblock_bit(page, page_to_pfn(page), PB_migrate_isolate);
+		set_pageblock_isolate(page);
 	else
-		clear_pfnblock_bit(page, page_to_pfn(page), PB_migrate_isolate);
+		clear_pageblock_isolate(page);
 }
 
 /**
author
#3 lore raw

PATCH v2 2/2 mm/pageblock-flags: remove PB_migratetype_bits/PB_migrate_end

In reply to Wei Yang

enum pageblock_bits defines the meaning of pageblock bits. Currently PB_migratetype_bits says the lowest 3 bits represents migratetype and PB_migrate_end/MIGRATETYPE_MASK's definition rely on it with magical computation.

Remove the definition of PB_migratetype_bits/PB_migrate_end. Use PB_migrate_[0|1|2] to represent lowest bits for migratetype. Then we can simplify related definition.

Also, MIGRATETYPE_AND_ISO_MASK is MIGRATETYPE_MASK add isolation bit. Use MIGRATETYPE_MASK in the definition of MIGRATETYPE_AND_ISO_MASK looks cleaner.

No functional change intended.

Cc Zi Yan <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc David Hildenbrand <[email protected]>

---
v2: remove PB_migratetype_bits and PB_migrate_end

---
 include/linux/pageblock-flags.h | 12 +++++-------
 mm/page_alloc.c                 |  4 ++--
 2 files changed, 7 insertions(+), 9 deletions(-)
include/linux/pageblock-flags.h +5 -7
index 6a44be0f39f4..6e4c2da15706 100644
@@ -13,12 +13,11 @@
 
 #include <linux/types.h>
 
-#define PB_migratetype_bits 3
 /* Bit indices that affect a whole block of pages */
 enum pageblock_bits {
-	PB_migrate,
-	PB_migrate_end = PB_migrate + PB_migratetype_bits - 1,
-			/* 3 bits required for migrate types */
+	PB_migrate_0,
+	PB_migrate_1,
+	PB_migrate_2,
 	PB_compact_skip,/* If set the block is skipped by compaction */
 
 #ifdef CONFIG_MEMORY_ISOLATION
@@ -37,11 +36,10 @@ enum pageblock_bits {
 
 #define NR_PAGEBLOCK_BITS (roundup_pow_of_two(__NR_PAGEBLOCK_BITS))
 
-#define MIGRATETYPE_MASK ((1UL << (PB_migrate_end + 1)) - 1)
+#define MIGRATETYPE_MASK (PB_migrate_0|PB_migrate_1|PB_migrate_2)
 
 #ifdef CONFIG_MEMORY_ISOLATION
-#define MIGRATETYPE_AND_ISO_MASK \
-	(((1UL << (PB_migrate_end + 1)) - 1) | BIT(PB_migrate_isolate))
+#define MIGRATETYPE_AND_ISO_MASK (MIGRATETYPE_MASK | BIT(PB_migrate_isolate))
 #else
 #define MIGRATETYPE_AND_ISO_MASK MIGRATETYPE_MASK
 #endif
mm/page_alloc.c +2 -2
index e534f31a6b39..c1a18aaf8b41 100644
@@ -355,7 +355,7 @@ static inline int pfn_to_bitidx(const struct page *page, unsigned long pfn)
 
 static __always_inline bool is_standalone_pb_bit(enum pageblock_bits pb_bit)
 {
-	return pb_bit > PB_migrate_end && pb_bit < __NR_PAGEBLOCK_BITS;
+	return pb_bit >= PB_compact_skip && pb_bit < __NR_PAGEBLOCK_BITS;
 }
 
 static __always_inline void
@@ -370,7 +370,7 @@ get_pfnblock_bitmap_bitidx(const struct page *page, unsigned long pfn,
 #else
 	BUILD_BUG_ON(NR_PAGEBLOCK_BITS != 4);
 #endif
-	BUILD_BUG_ON(__MIGRATE_TYPE_END >= (1 << PB_migratetype_bits));
+	BUILD_BUG_ON(__MIGRATE_TYPE_END > MIGRATETYPE_MASK);
 	VM_BUG_ON_PAGE(!zone_spans_pfn(page_zone(page), pfn), page);
 
 	bitmap = get_pageblock_bitmap(page, pfn);
Signature · 1 line
2.34.1
reviewer
#4 lore raw

Re: [Patch v2 2/2] mm/pageblock-flags: remove PB_migratetype_bits/PB_migrate_end

Quoted 49 lines · Wei Yang

enum pageblock_bits defines the meaning of pageblock bits. Currently PB_migratetype_bits says the lowest 3 bits represents migratetype and PB_migrate_end/MIGRATETYPE_MASK's definition rely on it with magical computation.

Remove the definition of PB_migratetype_bits/PB_migrate_end. Use PB_migrate_[0|1|2] to represent lowest bits for migratetype. Then we can simplify related definition.

Also, MIGRATETYPE_AND_ISO_MASK is MIGRATETYPE_MASK add isolation bit. Use MIGRATETYPE_MASK in the definition of MIGRATETYPE_AND_ISO_MASK looks cleaner.

No functional change intended.

Cc Zi Yan <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc David Hildenbrand <[email protected]>

---
v2: remove PB_migratetype_bits and PB_migrate_end

---
 include/linux/pageblock-flags.h | 12 +++++-------
 mm/page_alloc.c                 |  4 ++--
 2 files changed, 7 insertions(+), 9 deletions(-)
include/linux/pageblock-flags.h +3 -4
index 6a44be0f39f4..6e4c2da15706 100644
@@ -13,12 +13,11 @@
 
 #include <linux/types.h>
 
-#define PB_migratetype_bits 3
 /* Bit indices that affect a whole block of pages */
 enum pageblock_bits {
-	PB_migrate,
-	PB_migrate_end = PB_migrate + PB_migratetype_bits - 1,
-			/* 3 bits required for migrate types */
+	PB_migrate_0,
+	PB_migrate_1,
+	PB_migrate_2,
 	PB_compact_skip,/* If set the block is skipped by compaction */
 
 #ifdef CONFIG_MEMORY_ISOLATION

include/linux/pageblock-flags.h enum pageblock_bits { · line 39

Quoted 5 lines
include/linux/pageblock-flags.h +1 -1
@@ -37,11 +36,10 @@ enum pageblock_bits {
 
 #define NR_PAGEBLOCK_BITS (roundup_pow_of_two(__NR_PAGEBLOCK_BITS))
 
-#define MIGRATETYPE_MASK ((1UL << (PB_migrate_end + 1)) - 1)
+#define MIGRATETYPE_MASK (PB_migrate_0|PB_migrate_1|PB_migrate_2)

I think David meant

#define MIGRATETYPE_MASK (BIT(PB_migrate_0)|BIT(PB_migrate_1)|BIT(PB_migrate_2))

Otherwise, LGTM. Feel free to add Reviewed-by: Zi Yan <[email protected]>, once you fix the above.

Quoted 32 lines
include/linux/pageblock-flags.h +1 -2
 #ifdef CONFIG_MEMORY_ISOLATION
-#define MIGRATETYPE_AND_ISO_MASK \
-	(((1UL << (PB_migrate_end + 1)) - 1) | BIT(PB_migrate_isolate))
+#define MIGRATETYPE_AND_ISO_MASK (MIGRATETYPE_MASK | BIT(PB_migrate_isolate))
 #else
 #define MIGRATETYPE_AND_ISO_MASK MIGRATETYPE_MASK
 #endif
mm/page_alloc.c +2 -2
index e534f31a6b39..c1a18aaf8b41 100644
@@ -355,7 +355,7 @@ static inline int pfn_to_bitidx(const struct page *page, unsigned long pfn)
 
 static __always_inline bool is_standalone_pb_bit(enum pageblock_bits pb_bit)
 {
-	return pb_bit > PB_migrate_end && pb_bit < __NR_PAGEBLOCK_BITS;
+	return pb_bit >= PB_compact_skip && pb_bit < __NR_PAGEBLOCK_BITS;
 }
 
 static __always_inline void
@@ -370,7 +370,7 @@ get_pfnblock_bitmap_bitidx(const struct page *page, unsigned long pfn,
 #else
 	BUILD_BUG_ON(NR_PAGEBLOCK_BITS != 4);
 #endif
-	BUILD_BUG_ON(__MIGRATE_TYPE_END >= (1 << PB_migratetype_bits));
+	BUILD_BUG_ON(__MIGRATE_TYPE_END > MIGRATETYPE_MASK);
 	VM_BUG_ON_PAGE(!zone_spans_pfn(page_zone(page), pfn), page);
 
 	bitmap = get_pageblock_bitmap(page, pfn);
Signature · 1 line
2.34.1

--
Best Regards,
Yan, Zi

author
#5 lore raw

Re: [Patch v2 2/2] mm/pageblock-flags: remove PB_migratetype_bits/PB_migrate_end

Quoted 52 lines · Zi Yan
Quoted 50 lines · Wei Yang

enum pageblock_bits defines the meaning of pageblock bits. Currently PB_migratetype_bits says the lowest 3 bits represents migratetype and PB_migrate_end/MIGRATETYPE_MASK's definition rely on it with magical computation.

Remove the definition of PB_migratetype_bits/PB_migrate_end. Use PB_migrate_[0|1|2] to represent lowest bits for migratetype. Then we can simplify related definition.

Also, MIGRATETYPE_AND_ISO_MASK is MIGRATETYPE_MASK add isolation bit. Use MIGRATETYPE_MASK in the definition of MIGRATETYPE_AND_ISO_MASK looks cleaner.

No functional change intended.

Cc Zi Yan <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc David Hildenbrand <[email protected]>

---
v2: remove PB_migratetype_bits and PB_migrate_end

---
 include/linux/pageblock-flags.h | 12 +++++-------
 mm/page_alloc.c                 |  4 ++--
 2 files changed, 7 insertions(+), 9 deletions(-)
include/linux/pageblock-flags.h +3 -4
index 6a44be0f39f4..6e4c2da15706 100644
@@ -13,12 +13,11 @@
 
 #include <linux/types.h>
 
-#define PB_migratetype_bits 3
 /* Bit indices that affect a whole block of pages */
 enum pageblock_bits {
-	PB_migrate,
-	PB_migrate_end = PB_migrate + PB_migratetype_bits - 1,
-			/* 3 bits required for migrate types */
+	PB_migrate_0,
+	PB_migrate_1,
+	PB_migrate_2,
 	PB_compact_skip,/* If set the block is skipped by compaction */
 
 #ifdef CONFIG_MEMORY_ISOLATION
@@ -37,11 +36,10 @@ enum pageblock_bits {
 
Quoted 9 lines

include/linux/pageblock-flags.h enum pageblock_bits { · line 39

Quoted 4 lines
include/linux/pageblock-flags.h +1 -1
 #define NR_PAGEBLOCK_BITS (roundup_pow_of_two(__NR_PAGEBLOCK_BITS))
 
-#define MIGRATETYPE_MASK ((1UL << (PB_migrate_end + 1)) - 1)
+#define MIGRATETYPE_MASK (PB_migrate_0|PB_migrate_1|PB_migrate_2)

I think David meant

#define MIGRATETYPE_MASK (BIT(PB_migrate_0)|BIT(PB_migrate_1)|BIT(PB_migrate_2))

Oops, I thinks you are right.

Signature · 2 lines
Wei Yang
Help you, Help me
#6 lore raw

Re: [Patch v2 2/2] mm/pageblock-flags: remove PB_migratetype_bits/PB_migrate_end

Quoted 53 lines · Wei Yang
Quoted 52 lines · Zi Yan
Quoted 50 lines · Wei Yang

enum pageblock_bits defines the meaning of pageblock bits. Currently PB_migratetype_bits says the lowest 3 bits represents migratetype and PB_migrate_end/MIGRATETYPE_MASK's definition rely on it with magical computation.

Remove the definition of PB_migratetype_bits/PB_migrate_end. Use PB_migrate_[0|1|2] to represent lowest bits for migratetype. Then we can simplify related definition.

Also, MIGRATETYPE_AND_ISO_MASK is MIGRATETYPE_MASK add isolation bit. Use MIGRATETYPE_MASK in the definition of MIGRATETYPE_AND_ISO_MASK looks cleaner.

No functional change intended.

Cc Zi Yan <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc David Hildenbrand <[email protected]>

---
v2: remove PB_migratetype_bits and PB_migrate_end

---
  include/linux/pageblock-flags.h | 12 +++++-------
  mm/page_alloc.c                 |  4 ++--
  2 files changed, 7 insertions(+), 9 deletions(-)
include/linux/pageblock-flags.h +3 -4
index 6a44be0f39f4..6e4c2da15706 100644
@@ -13,12 +13,11 @@
 
  #include <linux/types.h>
 
-#define PB_migratetype_bits 3
  /* Bit indices that affect a whole block of pages */
  enum pageblock_bits {
-	PB_migrate,
-	PB_migrate_end = PB_migrate + PB_migratetype_bits - 1,
-			/* 3 bits required for migrate types */
+	PB_migrate_0,
+	PB_migrate_1,
+	PB_migrate_2,
  	PB_compact_skip,/* If set the block is skipped by compaction */
 
  #ifdef CONFIG_MEMORY_ISOLATION
@@ -37,11 +36,10 @@ enum pageblock_bits {
 
Quoted 8 lines
Quoted 8 lines

include/linux/pageblock-flags.h enum pageblock_bits { · line 39

Quoted 4 lines
include/linux/pageblock-flags.h +1 -1
  #define NR_PAGEBLOCK_BITS (roundup_pow_of_two(__NR_PAGEBLOCK_BITS))
 
-#define MIGRATETYPE_MASK ((1UL << (PB_migrate_end + 1)) - 1)
+#define MIGRATETYPE_MASK (PB_migrate_0|PB_migrate_1|PB_migrate_2)

I think David meant

#define MIGRATETYPE_MASK (BIT(PB_migrate_0)|BIT(PB_migrate_1)|BIT(PB_migrate_2))

Yes :)

Quoted 3 lines
Quoted 1 line

Oops, I thinks you are right.

It goes without saying: please test your patches before submitting ;)

Signature · 3 lines
Cheers

David / dhildenb
author
#7 lore raw

Re: [Patch v2 2/2] mm/pageblock-flags: remove PB_migratetype_bits/PB_migrate_end

On Wed, Aug 27, 2025 at 11:16:02AM +0200, David Hildenbrand wrote:
[...]

Quoted 10 lines
Quoted 9 lines
Quoted 9 lines

include/linux/pageblock-flags.h enum pageblock_bits { · line 39

Quoted 5 lines
  #define NR_PAGEBLOCK_BITS (roundup_pow_of_two(__NR_PAGEBLOCK_BITS))
include/linux/pageblock-flags.h +1 -1
-#define MIGRATETYPE_MASK ((1UL << (PB_migrate_end + 1)) - 1)
+#define MIGRATETYPE_MASK (PB_migrate_0|PB_migrate_1|PB_migrate_2)

I think David meant

#define MIGRATETYPE_MASK (BIT(PB_migrate_0)|BIT(PB_migrate_1)|BIT(PB_migrate_2))

Quoted 8 lines

Yes :)

Quoted 3 lines
Quoted 1 line

Oops, I thinks you are right.

It goes without saying: please test your patches before submitting ;)

To be honest, I tested before submitting. And I confused why I don't see error.

Finally I found the reason is I don't set CONFIG_CMA... fortunate or unfortunate...

Quoted 4 lines
Signature · 3 lines
Cheers

David / dhildenb
Signature · 2 lines
Wei Yang
Help you, Help me
#8 lore raw

Re: [Patch v2 2/2] mm/pageblock-flags: remove PB_migratetype_bits/PB_migrate_end

In reply to Zi Yan
Quoted 59 lines · Zi Yan
Quoted 49 lines · Wei Yang

enum pageblock_bits defines the meaning of pageblock bits. Currently PB_migratetype_bits says the lowest 3 bits represents migratetype and PB_migrate_end/MIGRATETYPE_MASK's definition rely on it with magical computation.

Remove the definition of PB_migratetype_bits/PB_migrate_end. Use PB_migrate_[0|1|2] to represent lowest bits for migratetype. Then we can simplify related definition.

Also, MIGRATETYPE_AND_ISO_MASK is MIGRATETYPE_MASK add isolation bit. Use MIGRATETYPE_MASK in the definition of MIGRATETYPE_AND_ISO_MASK looks cleaner.

No functional change intended.

Cc Zi Yan <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc David Hildenbrand <[email protected]>

---
v2: remove PB_migratetype_bits and PB_migrate_end

---
  include/linux/pageblock-flags.h | 12 +++++-------
  mm/page_alloc.c                 |  4 ++--
  2 files changed, 7 insertions(+), 9 deletions(-)
include/linux/pageblock-flags.h +3 -4
index 6a44be0f39f4..6e4c2da15706 100644
@@ -13,12 +13,11 @@
 
  #include <linux/types.h>
 
-#define PB_migratetype_bits 3
  /* Bit indices that affect a whole block of pages */
  enum pageblock_bits {
-	PB_migrate,
-	PB_migrate_end = PB_migrate + PB_migratetype_bits - 1,
-			/* 3 bits required for migrate types */
+	PB_migrate_0,
+	PB_migrate_1,
+	PB_migrate_2,
  	PB_compact_skip,/* If set the block is skipped by compaction */
 
  #ifdef CONFIG_MEMORY_ISOLATION

include/linux/pageblock-flags.h enum pageblock_bits { · line 39

Quoted 5 lines
include/linux/pageblock-flags.h +1 -1
@@ -37,11 +36,10 @@ enum pageblock_bits {
 
  #define NR_PAGEBLOCK_BITS (roundup_pow_of_two(__NR_PAGEBLOCK_BITS))
 
-#define MIGRATETYPE_MASK ((1UL << (PB_migrate_end + 1)) - 1)
+#define MIGRATETYPE_MASK (PB_migrate_0|PB_migrate_1|PB_migrate_2)

I think David meant

Quoted 4 lines

#define MIGRATETYPE_MASK (BIT(PB_migrate_0)|BIT(PB_migrate_1)|BIT(PB_migrate_2))

Otherwise, LGTM. Feel free to add Reviewed-by: Zi Yan <[email protected]>, once you fix the above.

Yes, with that this should just work

Signature · 3 lines
Cheers

David / dhildenb
Acked-by on v2 2/2
#9 lore raw

Re: [Patch v2 2/2] mm/pageblock-flags: remove PB_migratetype_bits/PB_migrate_end

In reply to Wei Yang
Quoted 13 lines · Wei Yang

enum pageblock_bits defines the meaning of pageblock bits. Currently PB_migratetype_bits says the lowest 3 bits represents migratetype and PB_migrate_end/MIGRATETYPE_MASK's definition rely on it with magical computation.

Remove the definition of PB_migratetype_bits/PB_migrate_end. Use PB_migrate_[0|1|2] to represent lowest bits for migratetype. Then we can simplify related definition.

Also, MIGRATETYPE_AND_ISO_MASK is MIGRATETYPE_MASK add isolation bit. Use MIGRATETYPE_MASK in the definition of MIGRATETYPE_AND_ISO_MASK looks cleaner.

Quoted 7 lines

No functional change intended.

Cc Zi Yan <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc David Hildenbrand <[email protected]>

Once fixed as suggested,

syzbot Tested-by [email protected] on the v2 series
#10 lore raw
In reply to Wei Yang
syzbot ci has tested the following series

syzbot ci has tested the following series

[v2] mm/pageblock: improve readability of some pageblock handling
https://lore.kernel.org/all/[email protected]
* [Patch v2 1/2] mm/page_alloc: use xxx_pageblock_isolate() for better reading
* [Patch v2 2/2] mm/pageblock-flags: remove PB_migratetype_bits/PB_migrate_end

and found the following issue:
kernel build error

Full report is available here:
https://ci.syzbot.org/series/51db4b94-ae73-4ea0-8cf3-4ea5b7715cf1

***

kernel build error

tree:      torvalds
URL:       https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
base:      fab1beda7597fac1cecc01707d55eadb6bbe773c
arch:      amd64
compiler:  Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
config:    https://ci.syzbot.org/builds/49ee15fe-3add-4064-a3a9-1461fbba8c85/config

mm/page_alloc.c:373:2: error: call to '__compiletime_assert_1636' declared with 'error' attribute: BUILD_BUG_ON failed: __MIGRATE_TYPE_END > MIGRATETYPE_MASK

***

If these findings have caused you to resend the series or submit a separate fix, please add the following tag to your commit message:

---
This report is generated by a bot. It may contain errors. syzbot ci engineers can be reached at [email protected].

author
#11 lore raw
Quoted 17 lines · syzbot ci

syzbot ci has tested the following series

[v2] mm/pageblock: improve readability of some pageblock handling
https://lore.kernel.org/all/[email protected]
* [Patch v2 1/2] mm/page_alloc: use xxx_pageblock_isolate() for better reading
* [Patch v2 2/2] mm/pageblock-flags: remove PB_migratetype_bits/PB_migrate_end

and found the following issue:
kernel build error

Full report is available here:
https://ci.syzbot.org/series/51db4b94-ae73-4ea0-8cf3-4ea5b7715cf1

***

kernel build error

Quoted 9 lines
tree:      torvalds
URL:       https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
base:      fab1beda7597fac1cecc01707d55eadb6bbe773c
arch:      amd64
compiler:  Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
config:    https://ci.syzbot.org/builds/49ee15fe-3add-4064-a3a9-1461fbba8c85/config

mm/page_alloc.c:373:2: error: call to '__compiletime_assert_1636' declared with 'error' attribute: BUILD_BUG_ON failed: __MIGRATE_TYPE_END > MIGRATETYPE_MASK

Thanks, this is noticed by Zi Yan.

Quoted 9 lines

***

If these findings have caused you to resend the series or submit a separate fix, please add the following tag to your commit message:

---
This report is generated by a bot. It may contain errors. syzbot ci engineers can be reached at [email protected].

Signature · 2 lines
Wei Yang
Help you, Help me