lkml.org 
[lkml]   [2018]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHi v2] mm: put_and_wait_on_page_locked() while page is migrated
On Tue 27-11-18 16:49:47, Cristopher Lameter wrote:
> On Tue, 27 Nov 2018, Mike Rapoport wrote:
>
> > > * @page: The page to wait for.
> > > *
> > > * The caller should hold a reference on @page. They expect the page to
> > > * become unlocked relatively soon, but do not wish to hold up migration
> > > * (for example) by holding the reference while waiting for the page to
> > > * come unlocked. After this function returns, the caller should not
> > > * dereference @page.
> > > */
> >
> > How about:
> >
> > They expect the page to become unlocked relatively soon, but they can wait
> > for the page to come unlocked without holding the reference, to allow
> > other users of the @page (for example migration) to continue.
>
> All of this seems a bit strange and it seems unnecessary? Maybe we need a
> better explanation?
>
> A process has no refcount on a page struct and is waiting for it to become
> unlocked? Why? Should it not simply ignore that page and continue? It
> cannot possibly do anything with the page since it does not hold a
> refcount.

So do you suggest busy waiting on the page under migration?
--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2018-11-27 17:57    [W:0.112 / U:1.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site