lkml.org 
[lkml]   [2020]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/5] mm: Introduce mm_struct.has_pinned
From
Date
On 9/21/20 4:53 PM, John Hubbard wrote:
> On 9/21/20 2:17 PM, Peter Xu wrote:
>> (Commit message collected from Jason Gunthorpe)
>>
>> Reduce the chance of false positive from page_maybe_dma_pinned() by keeping
>
> Not yet, it doesn't. :)  More:
>
>> track if the mm_struct has ever been used with pin_user_pages(). mm_structs
>> that have never been passed to pin_user_pages() cannot have a positive
>> page_maybe_dma_pinned() by definition. This allows cases that might drive up
>> the page ref_count to avoid any penalty from handling dma_pinned pages.
>>
>> Due to complexities with unpining this trivial version is a permanent sticky
>> bit, future work will be needed to make this a counter.
>
> How about this instead:
>
> Subsequent patches intend to reduce the chance of false positives from
> page_maybe_dma_pinned(), by also considering whether or not a page has
> even been part of an mm struct that has ever had pin_user_pages*()


arggh, correction: please make that:

"...whether or not a page is part of an mm struct that...".

(Present tense.) Otherwise, people start wondering about the checkered past
of a page's past lives, and it badly distracts from the main point here. :)


thanks,
--
John Hubbard
NVIDIA

\
 
 \ /
  Last update: 2020-09-22 02:02    [W:0.170 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site