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

2024-09-05 Thread Alistair Popple
Jan Kara writes: > On Thu 27-06-24 10:54:21, 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 p

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

2024-07-02 Thread David Hildenbrand
On 02.07.24 13:46, Christoph Hellwig wrote: On Tue, Jul 02, 2024 at 09:18:31AM +0200, David Hildenbrand wrote: 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()?

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

2024-07-02 Thread Christoph Hellwig
On Tue, Jul 02, 2024 at 09:18:31AM +0200, David Hildenbrand wrote: > 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()? Unfortunately it is also used by a few

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

2024-07-02 Thread Alistair Popple
David Hildenbrand writes: > 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

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

2024-07-02 Thread David Hildenbrand
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

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

2024-06-27 Thread Jan Kara
On Thu 27-06-24 10:54:21, 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 s

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

2024-06-26 Thread Christoph Hellwig
On Thu, Jun 27, 2024 at 10:54:21AM +1000, Alistair Popple wrote: > +extern void prep_compound_page(struct page *page, unsigned int order); No need for the extern. > static int insert_page_into_pte_locked(struct vm_area_struct *vma, pte_t > *pte, > - unsigned long addr, struc

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

2024-06-26 Thread Alistair Popple
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.