Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Jinjiang Tu <tujinjiang@huawei.com>,
	akpm@linux-foundation.org, ziy@nvidia.com, luizcap@redhat.com,
	willy@infradead.org, linmiaohe@huawei.com,
	svetly.todorov@memverge.com, xu.xin16@zte.com.cn,
	chengming.zhou@linux.dev, linux-fsdevel@vger.kernel.org,
	linux-mm@kvack.org
Cc: wangkefeng.wang@huawei.com, sunnanyong@huawei.com
Subject: Re: [PATCH v2 2/3] fs: stable_page_flags(): use folio_test_*() helpers
Date: Mon, 20 Jul 2026 10:30:02 +0100	[thread overview]
Message-ID: <1147ca8f-166a-4236-98b4-0a37442cae1d@kernel.org> (raw)
In-Reply-To: <20260720033021.4091944-3-tujinjiang@huawei.com>

On 7/20/26 04:30, Jinjiang Tu wrote:
> Since commit 304daa8132a9 ("maps4: add /proc/kpageflags interface"),
> /proc/kpageflags directly operates on page->flags to determine page status.
> Later, commit 177975495914 ("proc: export more page flags in
> /proc/kpageflags") started using page helper functions when exposing new
> flags, leading to a mix of both approaches.
> 
> For tail pages, the original code did not return corresponding status.
> commit 0a71649cb724 ("/proc/kpageflags: return KPF_SLAB for slab tail
> pages") and commit 832fc1de01ae ("/proc/kpageflags: return KPF_BUDDY for
> "tail" buddy pages") made tail slab/buddy pages also return corresponding
> status. Then commit dee3d0bef2b0 ("proc: rewrite stable_page_flags()")
> made all tail pages return the same status as their head page, except for
> hwpoison and mapped flags. It also cached the folio's flags and operate on
> the flags directly to avoid concurrency issues if using folio_test_*()
> helpers.
> 
> Since commit 476d87d6a061 ("fs: stable_page_flags(): use snapshot_page()"),
> we can now safely switch to folio_test_*() helpers instead of directly
> operating on flags, which is more readable and consistent with the rest of
> the kernel. Only convert cfolio-specific flags (i.e., anon, ksm, swapcache)
> to folio_test_*() helpers, which reduces redundant code. Keep others
> unchanged due to they aren't folio-specific flags or coverting them doesn't
> cleanup.
> 
> No functional change is intended.
> 
> Signed-off-by: Jinjiang Tu <tujinjiang@huawei.com>

Acked-by: David Hildenbrand (Arm) <david@kernel.org>

-- 
Cheers,

David


  reply	other threads:[~2026-07-20  9:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20  3:30 [PATCH v2 0/3] cleanup for stable_page_flags() Jinjiang Tu
2026-07-20  3:30 ` [PATCH v2 1/3] fs: stable_page_flags(): use BIT_ULL() for KPF flags Jinjiang Tu
2026-07-20  3:30 ` [PATCH v2 2/3] fs: stable_page_flags(): use folio_test_*() helpers Jinjiang Tu
2026-07-20  9:30   ` David Hildenbrand (Arm) [this message]
2026-07-20  3:30 ` [PATCH v2 3/3] fs: stable_page_flags(): simplify KPF_IDLE handling Jinjiang Tu
2026-07-20  9:32   ` David Hildenbrand (Arm)
2026-07-20  5:30 ` [PATCH v2 0/3] cleanup for stable_page_flags() Andrew Morton

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=1147ca8f-166a-4236-98b4-0a37442cae1d@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=chengming.zhou@linux.dev \
    --cc=linmiaohe@huawei.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luizcap@redhat.com \
    --cc=sunnanyong@huawei.com \
    --cc=svetly.todorov@memverge.com \
    --cc=tujinjiang@huawei.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=willy@infradead.org \
    --cc=xu.xin16@zte.com.cn \
    --cc=ziy@nvidia.com \
    /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