John Hubbard
2023-Mar-29 03:45 UTC
[Nouveau] [PATCH] mm: Take a page reference when removing device exclusive entries
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 actuallyohh, and I really should have caught that too. I plead spending too much time recently in a somewhat more driver-centric mindset, and failing to mentally shift gears properly for this case. Sorry for missing that! thanks, -- John Hubbard NVIDIA
Alistair Popple
2023-Mar-30 00:26 UTC
[Nouveau] [PATCH] mm: Take a page reference when removing device exclusive entries
John Hubbard <jhubbard at nvidia.com> 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 actuallyI had stuck with using the page because none of this stuff (yet) supports compound pages anyway so we shouldn't see a tail page anyway. But point taken, I admit I need to find some time to get a deeper internalised understanding of folios than just s/page/folio.> ohh, and I really should have caught that too. I plead spending too much > time recently in a somewhat more driver-centric mindset, and failing to > mentally shift gears properly for this case. > > Sorry for missing that! > > thanks,
Seemingly Similar Threads
- [PATCH v2] mm: Take a page reference when removing device exclusive entries
- [PATCH] mm: Take a page reference when removing device exclusive entries
- [PATCH] mm: Take a page reference when removing device exclusive entries
- [RFC PATCH v1 00/10] mm: Introduce and use folio_owner_ops
- [PATCH] mm: Take a page reference when removing device exclusive entries