Thread (31 messages) 31 messages, 4 authors, 2021-04-01

Re: [PATCH v7 3/8] mm/rmap: Split try_to_munlock from try_to_unmap

From: Alistair Popple <apopple@nvidia.com>
Date: 2021-03-30 22:17:53
Also in: dri-devel, linux-mm, lkml, nouveau

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:
quoted
On Fri, Mar 26, 2021 at 11:08:00AM +1100, Alistair Popple wrote:
<snip>
quoted
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().
quoted
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
quoted
Jason



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


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help