Re: [PATCH 02/12] pci/p2pdma: Don't initialise page refcount to one

2024-10-10 Thread Alistair Popple
Logan Gunthorpe writes: > On 2024-09-09 22:14, Alistair Popple wrote: >> The reference counts for ZONE_DEVICE private pages should be >> initialised by the driver when the page is actually allocated by the >> driver allocator, not when they are first created. This is currently >> the case for M

Re: [PATCH 02/12] pci/p2pdma: Don't initialise page refcount to one

2024-10-10 Thread Alistair Popple
Dan Williams writes: > Alistair Popple wrote: [...] >> diff --git a/mm/memremap.c b/mm/memremap.c >> index 40d4547..07bbe0e 100644 >> --- a/mm/memremap.c >> +++ b/mm/memremap.c >> @@ -488,15 +488,24 @@ void free_zone_device_folio(struct folio *folio) >> folio->mapping = NULL; >> fol

Re: [PATCH 02/12] pci/p2pdma: Don't initialise page refcount to one

2024-09-21 Thread Dan Williams
Alistair Popple wrote: > The reference counts for ZONE_DEVICE private pages should be > initialised by the driver when the page is actually allocated by the > driver allocator, not when they are first created. This is currently > the case for MEMORY_DEVICE_PRIVATE and MEMORY_DEVICE_COHERENT pages >

Re: [PATCH 02/12] pci/p2pdma: Don't initialise page refcount to one

2024-09-11 Thread Bjorn Helgaas
On Wed, Sep 11, 2024 at 11:07:51AM +1000, Alistair Popple wrote: > > >> diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c > >> index 4f47a13..210b9f4 100644 > >> --- a/drivers/pci/p2pdma.c > >> +++ b/drivers/pci/p2pdma.c > >> @@ -129,6 +129,12 @@ static int p2pmem_alloc_mmap(struct file *fi

Re: [PATCH 02/12] pci/p2pdma: Don't initialise page refcount to one

2024-09-10 Thread Alistair Popple
>> diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c >> index 4f47a13..210b9f4 100644 >> --- a/drivers/pci/p2pdma.c >> +++ b/drivers/pci/p2pdma.c >> @@ -129,6 +129,12 @@ static int p2pmem_alloc_mmap(struct file *filp, struct >> kobject *kobj, >> } >> >> /* >> + * Initialis

Re: [PATCH 02/12] pci/p2pdma: Don't initialise page refcount to one

2024-09-10 Thread Logan Gunthorpe
On 2024-09-09 22:14, Alistair Popple wrote: > The reference counts for ZONE_DEVICE private pages should be > initialised by the driver when the page is actually allocated by the > driver allocator, not when they are first created. This is currently > the case for MEMORY_DEVICE_PRIVATE and MEMORY

Re: [PATCH 02/12] pci/p2pdma: Don't initialise page refcount to one

2024-09-10 Thread Bjorn Helgaas
In subject: PCI/P2PDMA: ... would match previous history. On Tue, Sep 10, 2024 at 02:14:27PM +1000, Alistair Popple wrote: > The reference counts for ZONE_DEVICE private pages should be > initialised by the driver when the page is actually allocated by the > driver allocator, not when they are

[PATCH 02/12] pci/p2pdma: Don't initialise page refcount to one

2024-09-09 Thread Alistair Popple
The reference counts for ZONE_DEVICE private pages should be initialised by the driver when the page is actually allocated by the driver allocator, not when they are first created. This is currently the case for MEMORY_DEVICE_PRIVATE and MEMORY_DEVICE_COHERENT pages but not MEMORY_DEVICE_PCI_P2PDMA