Re: [Nouveau] [RFC PATCH v3 0/2] mm: remove extra ZONE_DEVICE struct page refcount

2020-10-05 Thread Dan Williams
On Thu, Oct 1, 2020 at 11:17 AM Ralph Campbell wrote: > > This is still an RFC because after looking at the pmem/dax code some > more, I realized that the ZONE_DEVICE struct pages are being inserted > into the process' page tables with vmf_insert_mixed() and a zero > refcount on the ZONE_DEVICE st

Re: [Nouveau] [RFC PATCH v3 0/2] mm: remove extra ZONE_DEVICE struct page refcount

2020-10-05 Thread Matthew Wilcox
On Thu, Oct 01, 2020 at 11:17:13AM -0700, Ralph Campbell wrote: > This is still an RFC because after looking at the pmem/dax code some > more, I realized that the ZONE_DEVICE struct pages are being inserted > into the process' page tables with vmf_insert_mixed() and a zero > refcount on the ZONE_DE

Re: [Nouveau] [RFC PATCH v3 2/2] mm: remove extra ZONE_DEVICE struct page refcount

2020-10-05 Thread Ralph Campbell
On 10/1/20 10:59 PM, Christoph Hellwig wrote: On Thu, Oct 01, 2020 at 11:17:15AM -0700, Ralph Campbell wrote: ZONE_DEVICE struct pages have an extra reference count that complicates the code for put_page() and several places in the kernel that need to check the reference count to see that a pa

Re: [Nouveau] [RFC PATCH v3 1/2] ext4/xfs: add page refcount helper

2020-10-05 Thread Ralph Campbell
On 10/1/20 10:56 PM, Christoph Hellwig wrote: On Thu, Oct 01, 2020 at 11:17:14AM -0700, Ralph Campbell wrote: There are several places where ZONE_DEVICE struct pages assume a reference count == 1 means the page is idle and free. Instead of open coding this, add a helper function to hide this

[Nouveau] [PATCH] device: return error for unknown chipsets

2020-10-05 Thread Karol Herbst
Previously the code relied on device->pri to be NULL and to fail probing later. We really should just return an error inside nvkm_device_ctor for unsupported GPUs. Fixes: 24d5ff40a732 ("drm/nouveau/device: rework mmio mapping code to get rid of second map") Signed-off-by: Karol Herbst Cc: dann