From: Aboorva Devarajan <aboorvad@linux.ibm.com>
To: Balbir Singh <balbirs@nvidia.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, Jason Gunthorpe <jgg@ziepe.ca>,
Leon Romanovsky <leon@kernel.org>,
David Hildenbrand <david@kernel.org>,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R . Howlett" <liam@infradead.org>,
Vlastimil Babka <vbabka@kernel.org>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>, Shuah Khan <shuah@kernel.org>,
Ralph Campbell <rcampbell@nvidia.com>,
Matthew Brost <matthew.brost@intel.com>,
Alistair Popple <apopple@nvidia.com>,
Alex Sierra <alex.sierra@amd.com>,
Matthew Wilcox <willy@infradead.org>,
Sayali Patil <sayalip@linux.ibm.com>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
aboorvad@linux.ibm.com
Subject: Re: [PATCH v3 1/3] selftests/mm: allow PUD-level entries in compound testcase of hmm tests
Date: Wed, 24 Jun 2026 09:04:13 +0530 [thread overview]
Message-ID: <67f6be911aba36393327a9e88285e2237d3e6032.camel@linux.ibm.com> (raw)
In-Reply-To: <aivB1jLODH1W_0yt@parvat>
On Mon, 2026-06-15 at 10:16 +1000, Balbir Singh wrote:
> On Thu, Jun 11, 2026 at 09:11:00AM +0530, Aboorva Devarajan wrote:
> > From: Sayali Patil <sayalip@linux.ibm.com>
> >
> > The HMM compound testcase currently assumes only PMD-level mappings and
> > fails on systems where default_hugepagesz=1G is set, because the region
> > is then reported by the device at PUD level.
> >
> > Determine the mapping level (PMD or PUD) the device reports for the first
> > page of the range and require every page to match that level exactly via
> > ASSERT_EQ(). This accepts PUD-level mappings while preserving the
> > expected/observed protection values printed on failure, and rejects a
> > fragmented mapping that mixes PMD- and PUD-level entries within the same
> > range (which a per-page OR check would have let pass).
> >
>
> PUD is not supported with zone device private folios, the fix should
> be really around default_huge_page_size(), using the default pmd size.
>
> Balbir
Thanks Balbir for the review.
IIUC, PUD not-supported restriction applies to the migration path
(device-private folios top out at PMD), which the migrate_* tests cover but compound
is purely a snapshot of the CPU page tables, where a 1G hugetlb page can
shows up at PUD. I guess HMM_DMIRROR_PROT_PUD was in fact added in e478425bec93
(the same commit this patch Fixes:) to express PUD-sized snapshot entries,
so handling it here is using the bit for its original purpose. I verified the v3 patch
passes on a default_hugepagesz=1G boot (m[i] == WRITE|PUD), and fails without it.
But if you'd still prefer to keep this test-case strictly PMD-only, please let us know.
Regards,
Aboorva
next prev parent reply other threads:[~2026-06-24 3:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-11 3:40 [PATCH v3 0/3] selftests/mm: assorted fixes for hmm-tests Aboorva Devarajan
2026-06-11 3:41 ` [PATCH v3 1/3] selftests/mm: allow PUD-level entries in compound testcase of hmm tests Aboorva Devarajan
2026-06-15 0:16 ` Balbir Singh
2026-06-24 3:34 ` Aboorva Devarajan [this message]
2026-06-11 3:41 ` [PATCH v3 2/3] selftests/mm: remove hardcoded THP sizing assumptions in " Aboorva Devarajan
2026-06-12 8:22 ` Balbir Singh
2026-06-11 3:41 ` [PATCH v3 3/3] selftests/mm: fix exclusive_cow test fork() handling Aboorva Devarajan
2026-06-11 4:59 ` Balbir Singh
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=67f6be911aba36393327a9e88285e2237d3e6032.camel@linux.ibm.com \
--to=aboorvad@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=alex.sierra@amd.com \
--cc=apopple@nvidia.com \
--cc=balbirs@nvidia.com \
--cc=david@kernel.org \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=matthew.brost@intel.com \
--cc=mhocko@suse.com \
--cc=rcampbell@nvidia.com \
--cc=rppt@kernel.org \
--cc=sayalip@linux.ibm.com \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
--cc=willy@infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.