Thread (54 messages) 54 messages, 10 authors, 2024-09-06

Re: [PATCH 06/13] mm/memory: Add dax_insert_pfn

From: David Hildenbrand <hidden>
Date: 2024-07-02 07:18:37
Also in: linux-cxl, linux-doc, linux-ext4, linux-fsdevel, linux-mm, linux-xfs, linuxppc-dev, lkml, nvdimm

On 27.06.24 02:54, Alistair Popple wrote:
Currently to map a DAX page the DAX driver calls vmf_insert_pfn. This
creates a special devmap PTE entry for the pfn but does not take a
reference on the underlying struct page for the mapping. This is
because DAX page refcounts are treated specially, as indicated by the
presence of a devmap entry.

To allow DAX page refcounts to be managed the same as normal page
refcounts introduce dax_insert_pfn. This will take a reference on the
underlying page much the same as vmf_insert_page, except it also
permits upgrading an existing mapping to be writable if
requested/possible.
We have this comparably nasty vmf_insert_mixed() that FS dax abused to 
insert into !VM_MIXED VMAs. Is that abuse now stopping and are there 
maybe ways to get rid of vmf_insert_mixed()?

-- 
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