lkml.org 
[lkml]   [2020]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v5.5 10/10] mmap locking API: rename mmap_sem to mmap_lock
    On Wed, May 20, 2020 at 12:32 AM John Hubbard <jhubbard@nvidia.com> wrote:
    > On 2020-05-19 19:39, Michel Lespinasse wrote:
    > >> That gives you additional options inside internal_get_user_pages_fast(), such
    > >> as, approximately:
    > >>
    > >> if (!(gup_flags & FOLL_FAST_ONLY))
    > >> might_lock_read(&current->mm->mmap_lock);
    > >>
    > >> ...not that that is necessarily a great idea, seeing as how it merely changes
    > >> "might lock" into "maybe might lock". :)
    > >
    > > I think that is completely fine, makes sure everyone not using
    > > FOLL_FAST_ONLY realizes that the call could block.
    > >
    > > Can I ask you to add that assertion in your patchset ? Based on
    > > Matthew's feedback, I would do it in my patchset, but it doesn't seem
    > > worth doing if we know this will conflict with your changes.
    >
    > Sure, that's no problem. Although it looks like my changes may land
    > in mmotm first, and then your patchset, so maybe the right move is to
    > make this change *after* both of those things happen, yes?

    I don't have a strong opinion on this. I would suggest you add the
    might_lock_read() assertion and whoever comes in second will deal with
    the conflict by changing mmap_sem to mmap_lock in that assertion.

    --
    Michel "Walken" Lespinasse
    A program is never fully debugged until the last user dies.

    \
     
     \ /
      Last update: 2020-05-20 10:03    [W:3.200 / U:0.756 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site