Re: [PATCH v8 20/20] device/dax: Properly refcount device dax pages when mapping

2025-02-24 Thread Alistair Popple
On Thu, Feb 20, 2025 at 07:33:34PM +0100, Gerald Schaefer wrote: > On Tue, 18 Feb 2025 14:55:36 +1100 > Alistair Popple wrote: > > [...] > > diff --git a/mm/memremap.c b/mm/memremap.c > > index 9a8879b..532a52a 100644 > > --- a/mm/memremap.c > > +++ b/mm/memremap.c > > @@ -460,11 +460,10 @@ void

Re: [PATCH v8 20/20] device/dax: Properly refcount device dax pages when mapping

2025-02-20 Thread Gerald Schaefer
On Tue, 18 Feb 2025 14:55:36 +1100 Alistair Popple wrote: [...] > diff --git a/mm/memremap.c b/mm/memremap.c > index 9a8879b..532a52a 100644 > --- a/mm/memremap.c > +++ b/mm/memremap.c > @@ -460,11 +460,10 @@ void free_zone_device_folio(struct folio *folio) > { > struct dev_pagemap *pgmap

[PATCH v8 20/20] device/dax: Properly refcount device dax pages when mapping

2025-02-17 Thread Alistair Popple
Device DAX pages are currently not reference counted when mapped, instead relying on the devmap PTE bit to ensure mapping code will not get/put references. This requires special handling in various page table walkers, particularly GUP, to manage references on the underlying pgmap to ensure the page