linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yang <richard.weiyang@gmail.com>
To: akpm@linux-foundation.org, david@redhat.com,
	lorenzo.stoakes@oracle.com, vbabka@suse.cz
Cc: linux-mm@kvack.org, Wei Yang <richard.weiyang@gmail.com>
Subject: [Patch v3 0/2] mm/pageblock: improve readability of some pageblock handling
Date: Wed, 27 Aug 2025 07:01:03 +0000	[thread overview]
Message-ID: <20250827070105.16864-1-richard.weiyang@gmail.com> (raw)

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.

v2->v3:
    fix the definition of MIGRATETYPE_MASK, thanks ziy

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(-)

-- 
2.34.1



             reply	other threads:[~2025-08-27  7:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-27  7:01 Wei Yang [this message]
2025-08-27  7:01 ` [Patch v3 1/2] mm/page_alloc: use xxx_pageblock_isolate() for better reading Wei Yang
2025-08-27  7:01 ` [Patch v3 2/2] mm/pageblock-flags: remove PB_migratetype_bits/PB_migrate_end Wei Yang
2025-08-27 11:30   ` David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250827070105.16864-1-richard.weiyang@gmail.com \
    --to=richard.weiyang@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox