From: David Hildenbrand <david@redhat.com>
To: Dan Williams <dan.j.williams@intel.com>, linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org, nvdimm@lists.linux.dev,
linux-cxl@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Alistair Popple <apopple@nvidia.com>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Vlastimil Babka <vbabka@suse.cz>, Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>, Zi Yan <ziy@nvidia.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Nico Pache <npache@redhat.com>,
Ryan Roberts <ryan.roberts@arm.com>, Dev Jain <dev.jain@arm.com>
Subject: Re: [PATCH v1 0/2] mm/huge_memory: don't mark refcounted pages special in vmf_insert_folio_*()
Date: Fri, 6 Jun 2025 09:28:20 +0200 [thread overview]
Message-ID: <371ac1ce-8f14-4914-94f5-6e6b46a486fb@redhat.com> (raw)
In-Reply-To: <68422c7a3a2c2_2491100fe@dwillia2-xfh.jf.intel.com.notmuch>
Hi Dan,
On 06.06.25 01:47, Dan Williams wrote:
> David Hildenbrand wrote:
>> Based on Linus' master.
>>
>> While working on improving vm_normal_page() and friends, I stumbled
>> over this issues: refcounted "normal" pages must not be marked
>> using pmd_special() / pud_special().
>>
>> Fortunately, so far there doesn't seem to be serious damage.
>>
>> This is only compile-tested so far. Still looking for an easy way to test
>> PMD/PUD mappings with DAX. Any tests I can easily run?
>
> The way I test this I would not classify as "easy", it is a bit of a pain
> to setup, but it is passing here:
I guess most of the instructions are in
https://github.com/pmem/ndctl
?
I would assume that we need to set aside some special dax area using
early boot params (memmap=).
Might come in handy in the future.
>
> [root@host ndctl]# meson test -C build --suite ndctl:dax
> ninja: Entering directory `/root/git/ndctl/build'
> [168/168] Linking target cxl/cxl
> 1/13 ndctl:dax / daxdev-errors.sh OK 14.30s
> 2/13 ndctl:dax / multi-dax.sh OK 2.89s
> 3/13 ndctl:dax / sub-section.sh OK 8.40s
> 4/13 ndctl:dax / dax-dev OK 0.06s
> 5/13 ndctl:dax / dax-ext4.sh OK 20.53s
> 6/13 ndctl:dax / dax-xfs.sh OK 20.34s
> 7/13 ndctl:dax / device-dax OK 11.67s
> 8/13 ndctl:dax / revoke-devmem OK 0.25s
> 9/13 ndctl:dax / device-dax-fio.sh OK 34.02s
> 10/13 ndctl:dax / daxctl-devices.sh OK 3.44s
> 11/13 ndctl:dax / daxctl-create.sh SKIP 0.32s exit status 77
> 12/13 ndctl:dax / dm.sh OK 1.33s
> 13/13 ndctl:dax / mmap.sh OK 85.12s
>
> ...ignore the SKIP, that seems to be caused by an acpi-einj regression.
Thanks for running these tests!
>
> However, how about not duplicating the internals of insert_pfn_p[mu]d()
> with something like the below. Either way you can add:
I considered that, but I prefer the current end result where we cleanup
the pmd_none() handling and not mess with folios and pfns at the same time.
... just like we do for insert_pfn() vs. insert_page(), I don't think
these code paths should be unified.
(we should do more sanity checks like validate_page_before_insert()
etc., but that's something for another day :) )
>
> Tested-by: Dan Williams <dan.j.williams@intel.com>
> Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Thanks!
Let me resend with the fixup squashed.
--
Cheers,
David / dhildenb
prev parent reply other threads:[~2025-06-06 7:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 21:16 [PATCH v1 0/2] mm/huge_memory: don't mark refcounted pages special in vmf_insert_folio_*() David Hildenbrand
2025-06-03 21:16 ` [PATCH v1 1/2] mm/huge_memory: don't mark refcounted pages special in vmf_insert_folio_pmd() David Hildenbrand
2025-06-06 8:20 ` Oscar Salvador
2025-06-06 8:23 ` David Hildenbrand
2025-06-06 8:26 ` Oscar Salvador
2025-06-06 8:52 ` David Hildenbrand
2025-06-06 18:41 ` David Hildenbrand
2025-06-06 8:27 ` Oscar Salvador
2025-06-03 21:16 ` [PATCH v1 2/2] mm/huge_memory: don't mark refcounted pages special in vmf_insert_folio_pud() David Hildenbrand
2025-06-03 22:02 ` David Hildenbrand
2025-06-06 8:27 ` Oscar Salvador
2025-06-03 21:36 ` [PATCH v1 0/2] mm/huge_memory: don't mark refcounted pages special in vmf_insert_folio_*() David Hildenbrand
2025-06-05 23:47 ` Dan Williams
2025-06-06 7:28 ` David Hildenbrand [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=371ac1ce-8f14-4914-94f5-6e6b46a486fb@redhat.com \
--to=david@redhat.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=dan.j.williams@intel.com \
--cc=dev.jain@arm.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=npache@redhat.com \
--cc=nvdimm@lists.linux.dev \
--cc=rppt@kernel.org \
--cc=ryan.roberts@arm.com \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--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;
as well as URLs for NNTP newsgroup(s).