[Nouveau] [PATCH v2] mm: Take a page reference when removing device exclusive entries

2023-03-29 Thread Alistair Popple
Device exclusive page table entries are used to prevent CPU access to a page whilst it is being accessed from a device. Typically this is used to implement atomic operations when the underlying bus does not support atomic access. When a CPU thread encounters a device exclusive entry it locks the

Re: [Nouveau] [PATCH v2] mm: Take a page reference when removing device exclusive entries

2023-03-29 Thread Christoph Hellwig
s/page/folio/ in the entire commit log?

Re: [Nouveau] [PATCH v2] mm: Take a page reference when removing device exclusive entries

2023-03-29 Thread John Hubbard
On 3/29/23 18:25, Alistair Popple wrote: Device exclusive page table entries are used to prevent CPU access to a page whilst it is being accessed from a device. Typically this is used to implement atomic operations when the underlying bus does not support atomic access. When a CPU thread

Re: [Nouveau] [PATCH] mm: Take a page reference when removing device exclusive entries

2023-03-29 Thread Alistair Popple
Alistair Popple writes: > John Hubbard writes: > >> On 3/28/23 20:16, Matthew Wilcox wrote: >> ... + if (!get_page_unless_zero(vmf->page)) + return 0; >>> From a folio point of view: what the hell are you doing here? Tail >>> pages don't have individual refcounts; all

Re: [Nouveau] [PATCH v2] mm: Take a page reference when removing device exclusive entries

2023-03-29 Thread Alistair Popple
Christoph Hellwig writes: > s/page/folio/ in the entire commit log? I debated that but settled on leaving it as is because device exclusive entries only deal with non-compound pages for now and didn't want to give any other impression. Happy to change that though if people think it would be

Re: [Nouveau] [PATCH 6.2 regression fix] drm/nouveau/kms: Fix backlight registration

2023-03-29 Thread Hans de Goede
Hi, On 3/29/23 00:23, Lyude Paul wrote: > Reviewed-by: Lyude Paul > > (Also note to Mark: this is my way of letting you know someone fixed the > regression with backlight controls upstream, looking into the weird bright > screen after resume issue) Thanks. I have pushed this to drm-misc-fixes

[Nouveau] [PATCH] drm/nouveau/svm: remove unused ret variable

2023-03-29 Thread Tom Rix
clang with W=1 reports drivers/gpu/drm/nouveau/nouveau_svm.c:929:6: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable] int ret; ^ This variable is not used so remove it. Signed-off-by: Tom Rix --- drivers/gpu/drm/nouveau/nouveau_svm.c | 5 ++--- 1

Re: [Nouveau] [PATCH] mm: Take a page reference when removing device exclusive entries

2023-03-29 Thread Alistair Popple
John Hubbard writes: > On 3/28/23 20:16, Matthew Wilcox wrote: > ... >>> + if (!get_page_unless_zero(vmf->page)) >>> + return 0; >> From a folio point of view: what the hell are you doing here? Tail >> pages don't have individual refcounts; all the refcounts are actually I had