Thread (31 messages) flat view 31 messages, 2 authors, 2025-06-19

Re: [PATCH v2 03/14] mm: Convert vmf_insert_mixed() from using pte_devmap to pte_special

From: David Hildenbrand <hidden>
Date: 2025-06-18 09:31:08
Also in: dri-devel, linux-arm-kernel, linux-cxl, linux-ext4, linux-fsdevel, linux-mm, linux-riscv, linux-xfs, lkml, loongarch, nvdimm

On 17.06.25 11:49, David Hildenbrand wrote:
On 16.06.25 13:58, Alistair Popple wrote:
quoted
DAX no longer requires device PTEs as it always has a ZONE_DEVICE page
associated with the PTE that can be reference counted normally. Other users
of pte_devmap are drivers that set PFN_DEV when calling vmf_insert_mixed()
which ensures vm_normal_page() returns NULL for these entries.

There is no reason to distinguish these pte_devmap users so in order to
free up a PTE bit use pte_special instead for entries created with
vmf_insert_mixed(). This will ensure vm_normal_page() will continue to
return NULL for these pages.

Architectures that don't support pte_special also don't support pte_devmap
so those will continue to rely on pfn_valid() to determine if the page can
be mapped.

Signed-off-by: Alistair Popple <apopple@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Dan Williams <redacted>
---
As Andrew notes offlined, there is no content here. I sent this by mistake
after replying to patch#6 instead.

-- 
Cheers,

David / dhildenb

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help