linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mm/pageblock: improve readability of some pageblock handling
@ 2025-08-26  9:31 Wei Yang
  2025-08-26  9:31 ` [PATCH 1/2] mm/page_alloc: use xxx_pageblock_isolate() for better reading Wei Yang
  2025-08-26  9:31 ` [PATCH 2/2] mm/pageblock-flags: simplify MIGRATETYPE_MASK definition Wei Yang
  0 siblings, 2 replies; 9+ messages in thread
From: Wei Yang @ 2025-08-26  9:31 UTC (permalink / raw)
  To: akpm, david, lorenzo.stoakes, vbabka; +Cc: linux-mm, Wei Yang

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: First we could use PB_migratetype_bits to define MIGRATETYPE_MASK.
Second use MIGRATETYPE_MASK to define MIGRATETYPE_AND_ISO_MASK instead of
duplicate the definition.

Wei Yang (2):
  mm/page_alloc: use xxx_pageblock_isolate() for better reading
  mm/pageblock-flags: simplify MIGRATETYPE_MASK definition

 include/linux/pageblock-flags.h | 5 ++---
 mm/page_alloc.c                 | 7 +++----
 2 files changed, 5 insertions(+), 7 deletions(-)

-- 
2.34.1



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

end of thread, other threads:[~2025-08-26 15:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-26  9:31 [PATCH 0/2] mm/pageblock: improve readability of some pageblock handling Wei Yang
2025-08-26  9:31 ` [PATCH 1/2] mm/page_alloc: use xxx_pageblock_isolate() for better reading Wei Yang
2025-08-26 13:26   ` Zi Yan
2025-08-26 13:28   ` David Hildenbrand
2025-08-26  9:31 ` [PATCH 2/2] mm/pageblock-flags: simplify MIGRATETYPE_MASK definition Wei Yang
2025-08-26 13:34   ` David Hildenbrand
2025-08-26 15:19     ` Wei Yang
2025-08-26 15:29       ` David Hildenbrand
2025-08-26 13:35   ` Zi Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).