From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alistair Popple Date: Tue, 30 Mar 2021 22:16:41 +0000 Subject: Re: [PATCH v7 3/8] mm/rmap: Split try_to_munlock from try_to_unmap Message-Id: <1636116.HIPWbOE89B@nvdebian> List-Id: References: <20210326000805.2518-1-apopple@nvidia.com> <20210330184903.GZ2356281@nvidia.com> <12442194.rtmf8Ope3M@nvdebian> In-Reply-To: <12442194.rtmf8Ope3M@nvdebian> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: dri-devel@lists.freedesktop.org Cc: Jason Gunthorpe , rcampbell@nvidia.com, willy@infradead.org, linux-doc@vger.kernel.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org, hch@infradead.org, linux-mm@kvack.org, jglisse@redhat.com, bskeggs@redhat.com, jhubbard@nvidia.com, akpm@linux-foundation.org, Christoph Hellwig 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: > > 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 > >