From: Andrew Morton <akpm@linux-foundation.org>
To: Zi Yan <ziy@nvidia.com>
Cc: Vlastimil Babka <vbabka@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
Brendan Jackman <jackmanb@google.com>,
Johannes Weiner <hannes@cmpxchg.org>,
David Hildenbrand <david@kernel.org>,
Lorenzo Stoakes <ljs@kernel.org>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
"Liam R. Howlett" <liam@infradead.org>,
Nico Pache <npache@redhat.com>,
Ryan Roberts <ryan.roberts@arm.com>, Dev Jain <dev.jain@arm.com>,
Barry Song <baohua@kernel.org>, Lance Yang <lance.yang@linux.dev>,
Mike Rapoport <rppt@kernel.org>, Dennis Zhou <dennis@kernel.org>,
Tejun Heo <tj@kernel.org>, Christoph Lameter <cl@gentwo.org>,
Alistair Popple <apopple@nvidia.com>,
Usama Arif <usama.arif@linux.dev>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/5] Keep tail page private zero at free and folio split time
Date: Thu, 9 Jul 2026 11:40:58 -0700 [thread overview]
Message-ID: <20260709114058.52eb184d1529a247993ebdf8@linux-foundation.org> (raw)
In-Reply-To: <20260709-keep-subpage-private-zero-at-free-v3-0-7e4fe155f5b9@nvidia.com>
On Thu, 09 Jul 2026 14:06:00 -0400 Zi Yan <ziy@nvidia.com> wrote:
> Hi all,
>
> This patchset makes sure tail_page->private is zero before compound or
> high-order pages are returned to the allocator. It also checks tail pages
> that become new folio heads during large folio split, before their private
> fields are used by new folios.
Updated, thanks.
> Changes in v3:
> 1. replaced "it" with "a DEBUG_VM check" in Patch 3 commit message
> 2. moved tail_page->private bad_page() code up to the existing
> is_check_pages_enabled() block in Patch 4.
> - Link to v2: https://lore.kernel.org/r/20260703-keep-subpage-private-zero-at-free-v2-0-2970fe777dd6@nvidia.com
Here's how v3 altered mm.git:
mm/page_alloc.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
--- a/mm/page_alloc.c~b
+++ a/mm/page_alloc.c
@@ -1386,13 +1386,14 @@ static __always_inline bool __free_pages
bad++;
continue;
}
+
+ if (tail_page->private) {
+ bad_page(tail_page, "nonzero private");
+ bad++;
+ continue;
+ }
}
tail_page->flags.f &= ~PAGE_FLAGS_CHECK_AT_PREP;
- if (is_check_pages_enabled() && tail_page->private) {
- bad_page(tail_page, "nonzero private");
- bad++;
- continue;
- }
}
}
if (folio_test_anon(folio)) {
_
prev parent reply other threads:[~2026-07-09 18:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 18:06 [PATCH v3 0/5] Keep tail page private zero at free and folio split time Zi Yan
2026-07-09 18:06 ` [PATCH v3 1/5] mm/percpu-km: clear page->private before free them Zi Yan
2026-07-09 18:06 ` [PATCH v3 2/5] mm/compaction: stop recording free page order in page->private Zi Yan
2026-07-09 18:06 ` [PATCH v3 3/5] mm/huge_memory: add page->private check back in __split_folio_to_order() Zi Yan
2026-07-09 18:06 ` [PATCH v3 4/5] mm/page_alloc: make sure tail_page->private is zero at page free time Zi Yan
2026-07-10 12:51 ` David Hildenbrand (Arm)
2026-07-09 18:06 ` [PATCH v3 5/5] mm/page_alloc: remove set_page_private() in prep_compound_tail() Zi Yan
2026-07-09 18:40 ` Andrew Morton [this message]
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=20260709114058.52eb184d1529a247993ebdf8@linux-foundation.org \
--to=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=lance.yang@linux.dev \
--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=usama.arif@linux.dev \
--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