lkml.org 
[lkml]   [2021]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v7 3/8] mm/rmap: Split try_to_munlock from try_to_unmap
Date
On Wednesday, 31 March 2021 9:09:30 AM AEDT Alistair Popple wrote:
> On Wednesday, 31 March 2021 5:49:03 AM AEDT Jason Gunthorpe wrote:
> > On Fri, Mar 26, 2021 at 11:08:00AM +1100, Alistair Popple wrote:

<snip>

> > So what clears PG_mlocked on this call path?
>
> See munlock_vma_page(). munlock works by clearing PG_mlocked, then calling
> try_to_munlock to check if any VMAs still need it locked in which case
> PG_mlocked gets set again. There are no other callers of try_to_munlock().
>
> > Something needs attention here..
>
> I think the code is correct, but perhaps the naming could be better. Would be
> interested hearing any thoughts on renaming try_to_munlock() to try_to_mlock()
> as the current name appears based on the context it is called from (munlock)
> rather than what it does (mlock).

Actually Documentation/vm/unevictable-lru.rst contains a better suggestion:

try_to_munlock() Reverse Map Scan
---------------------------------

.. warning::
[!] TODO/FIXME: a better name might be page_mlocked() - analogous to the
page_referenced() reverse map walker.

Thoughts on renaming try_to_unlock() -> page_mlocked() and try_to_munlock_one() -> page_mlock_one()?

> - Alistair
>
> > Jason
> >
>
>
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>




\
 
 \ /
  Last update: 2021-03-31 00:19    [W:0.065 / U:1.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site