lkml.org 
[lkml]   [2015]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/16] page-flags: define PG_locked behavior on compound pages
On Fri, Mar 20, 2015 at 03:32:05PM +0800, Hillf Danton wrote:
> > --- a/include/linux/page-flags.h
> > +++ b/include/linux/page-flags.h
> > @@ -269,7 +269,7 @@ static inline struct page *compound_head_fast(struct page *page)
> > return page;
> > }
> >
> > -TESTPAGEFLAG(Locked, locked, ANY)
> > +__PAGEFLAG(Locked, locked, NO_TAIL)
> > PAGEFLAG(Error, error, ANY) TESTCLEARFLAG(Error, error, ANY)
> > PAGEFLAG(Referenced, referenced, ANY) TESTCLEARFLAG(Referenced, referenced, ANY)
> > __SETPAGEFLAG(Referenced, referenced, ANY)
> [...]
> > @@ -490,9 +481,9 @@ extern int wait_on_page_bit_killable_timeout(struct page *page,
> >
> > static inline int wait_on_page_locked_killable(struct page *page)
> > {
> > - if (PageLocked(page))
> > - return wait_on_page_bit_killable(page, PG_locked);
> > - return 0;
> > + if (!PageLocked(page))
> > + return 0;
>
> I am lost here: can we feed any page to NO_TAIL operation?

NO_TAIL triggers VM_BUG on set/clear, but not on checks. PageLocked() will
look on head page.

I tried to enforce policy for checks too, but it triggers all over the
kernel. We tend to check random pages.

We can try apply enforcing for *some* flags, but I didn't evaluate that.

--
Kirill A. Shutemov


\
 
 \ /
  Last update: 2015-03-20 09:21    [W:0.052 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site