From: Lance Yang <lance.yang@linux.dev>
To: Zi Yan <ziy@nvidia.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Barry Song <baohua@kernel.org>,
David Hildenbrand <david@kernel.org>,
Michal Hocko <mhocko@suse.com>,
Andrew Morton <akpm@linux-foundation.org>,
"Liam R. Howlett" <liam@infradead.org>,
Dennis Zhou <dennis@kernel.org>,
Christoph Lameter <cl@gentwo.org>,
Mike Rapoport <rppt@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Lorenzo Stoakes <ljs@kernel.org>,
Ryan Roberts <ryan.roberts@arm.com>,
Alistair Popple <apopple@nvidia.com>, Dev Jain <dev.jain@arm.com>,
Brendan Jackman <jackmanb@google.com>,
Vlastimil Babka <vbabka@kernel.org>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Tejun Heo <tj@kernel.org>, Nico Pache <npache@redhat.com>,
Suren Baghdasaryan <surenb@google.com>
Subject: Re: [PATCH v2 5/5] mm/page_alloc: remove set_page_private() in prep_compound_tail()
Date: Fri, 3 Jul 2026 22:52:32 +0800 [thread overview]
Message-ID: <1f9e4322-1c5e-4409-9a12-ead280bfa4bd@linux.dev> (raw)
In-Reply-To: <20260703-keep-subpage-private-zero-at-free-v2-5-2970fe777dd6@nvidia.com>
On 2026/7/3 21:47, Zi Yan wrote:
> Tail pages are expected to have (and optionally be checked) zeroed
> ->private when they are freed. It stays true during subsequent
> reallocation, so replace the tail_page->private initialization with a
> VM_WARN_ON_ONCE() in compound page preparation.
>
> Acked-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
> Signed-off-by: Zi Yan <ziy@nvidia.com>
> ---
LGTM. Feel free to add:
Reviewed-by: Lance Yang <lance.yang@linux.dev>
> mm/internal.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/internal.h b/mm/internal.h
> index fa4fb69444ecd..fbd9fb84341bc 100644
> --- a/mm/internal.h
> +++ b/mm/internal.h
> @@ -902,7 +902,7 @@ static inline void prep_compound_tail(struct page *tail,
> {
> tail->mapping = TAIL_MAPPING;
> set_compound_head(tail, head, order);
> - set_page_private(tail, 0);
> + VM_WARN_ON_ONCE(tail->private);
> }
>
> static inline void init_compound_tail(struct page *tail,
>
next prev parent reply other threads:[~2026-07-03 14:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 13:47 [PATCH v2 0/5] Keep tail page private zero at free and folio split time Zi Yan
2026-07-03 13:47 ` [PATCH v2 1/5] mm/percpu-km: clear page->private before free them Zi Yan
2026-07-03 13:47 ` [PATCH v2 2/5] mm/compaction: stop recording free page order in page->private Zi Yan
2026-07-03 13:47 ` [PATCH v2 3/5] mm/huge_memory: add page->private check back in __split_folio_to_order() Zi Yan
2026-07-03 13:47 ` [PATCH v2 4/5] mm/page_alloc: make sure tail_page->private is zero at page free time Zi Yan
2026-07-03 13:47 ` [PATCH v2 5/5] mm/page_alloc: remove set_page_private() in prep_compound_tail() Zi Yan
2026-07-03 14:52 ` Lance Yang [this message]
2026-07-05 3:00 ` [PATCH v2 0/5] Keep tail page private zero at free and folio split time Zi Yan
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=1f9e4322-1c5e-4409-9a12-ead280bfa4bd@linux.dev \
--to=lance.yang@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=cl@gentwo.org \
--cc=david@kernel.org \
--cc=dennis@kernel.org \
--cc=dev.jain@arm.com \
--cc=hannes@cmpxchg.org \
--cc=jackmanb@google.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=npache@redhat.com \
--cc=rppt@kernel.org \
--cc=ryan.roberts@arm.com \
--cc=surenb@google.com \
--cc=tj@kernel.org \
--cc=vbabka@kernel.org \
--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