lkml.org 
[lkml]   [2018]   [Nov]   [28]   [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, Nov 27, 2018 at 12:58:48PM +0200, Mike Rapoport wrote:
> > diff --git a/mm/filemap.c b/mm/filemap.c
> > index 81adec8ee02c..575e16c037ca 100644
> > --- a/mm/filemap.c
> > +++ b/mm/filemap.c
> > @@ -1049,25 +1056,44 @@ static void wake_up_page(struct page *page, int bit)
> > wake_up_page_bit(page, bit);
> > }
> >
> > +/*
> > + * A choice of three behaviors for wait_on_page_bit_common():
> > + */
> > +enum behavior {
> > + EXCLUSIVE, /* Hold ref to page and take the bit when woken, like
> > + * __lock_page() waiting on then setting PG_locked.
> > + */
> > + SHARED, /* Hold ref to page and check the bit when woken, like
> > + * wait_on_page_writeback() waiting on PG_writeback.
> > + */
> > + DROP, /* Drop ref to page before wait, no check when woken,
> > + * like put_and_wait_on_page_locked() on PG_locked.
> > + */
> > +};
>
> Can we please make it:
>
> /**
> * enum behavior - a choice of three behaviors for wait_on_page_bit_common()
> */

The enum isn't used outside mm/filemap.c, so I'm not entirely sure that
including kernel-doc for it is a good idea.

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