lkml.org 
[lkml]   [2019]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 01/26] mm: gup: rename "nonblocking" to "locked" where proper
On Thu, Feb 21, 2019 at 10:17:42AM -0500, Jerome Glisse wrote:
> On Tue, Feb 12, 2019 at 10:56:07AM +0800, Peter Xu wrote:
> > There's plenty of places around __get_user_pages() that has a parameter
> > "nonblocking" which does not really mean that "it won't block" (because
> > it can really block) but instead it shows whether the mmap_sem is
> > released by up_read() during the page fault handling mostly when
> > VM_FAULT_RETRY is returned.
> >
> > We have the correct naming in e.g. get_user_pages_locked() or
> > get_user_pages_remote() as "locked", however there're still many places
> > that are using the "nonblocking" as name.
> >
> > Renaming the places to "locked" where proper to better suite the
> > functionality of the variable. While at it, fixing up some of the
> > comments accordingly.
> >
> > Reviewed-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
> > Signed-off-by: Peter Xu <peterx@redhat.com>
>
> Minor issue see below
>
> Reviewed-by: Jérôme Glisse <jglisse@redhat.com>
>
> [...]
>
> > @@ -656,13 +656,11 @@ static int check_vma_flags(struct vm_area_struct *vma, unsigned long gup_flags)
> > * appropriate) must be called after the page is finished with, and
> > * before put_page is called.
> > *
> > - * If @nonblocking != NULL, __get_user_pages will not wait for disk IO
> > - * or mmap_sem contention, and if waiting is needed to pin all pages,
> > - * *@nonblocking will be set to 0. Further, if @gup_flags does not
> > - * include FOLL_NOWAIT, the mmap_sem will be released via up_read() in
> > - * this case.
> > + * If @locked != NULL, *@locked will be set to 0 when mmap_sem is
> > + * released by an up_read(). That can happen if @gup_flags does not
> > + * has FOLL_NOWAIT.
>
> I am not a native speaker but i believe the correct wording is:
> @gup_flags does not have FOLL_NOWAIT

Yes I agree.

(r-b taken, and I kept Mike's too assuming this is a trivial change)

Thanks!

--
Peter Xu

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