lkml.org 
[lkml]   [2008]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 05/19] split LRU lists into anon & file sets
From
Date
On Fri, 2008-01-11 at 11:15 -0500, Rik van Riel wrote:
> On Fri, 11 Jan 2008 10:59:18 -0500
> Lee Schermerhorn <Lee.Schermerhorn@hp.com> wrote:
>
> > On Fri, 2008-01-11 at 10:42 -0500, Rik van Riel wrote:
> > > On Fri, 11 Jan 2008 15:24:34 +0900
> > > KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> > >
> > > > below patch is a bit cleanup proposal.
> > > > i think LRU_FILE is more clarify than "/2".
> > > >
> > > > What do you think it?
> > >
> > > Thank you for the cleanup, your version looks a lot nicer.
> > > I have applied your patch to my series.
> > >
> >
> > Rik:
> >
> > I think we also want to do something like:
> >
> > - BUILD_BUG_ON(LRU_INACTIVE_FILE != 2 || LRU_ACTIVE_FILE != 3);
> > + BUILD_BUG_ON(LRU_INACTIVE_FILE != 2 || LRU_ACTIVE_FILE != 3 ||
> > + NR_LRU_LISTS > 6);
> >
> > Then we'll be warned if future change might break our implicit
> > assumption that any lru_list value with '0x2' set is a file lru.
>
> Restoring the code to your original version makes things work again.
>
> OTOH, I almost wonder if we should not simply define it to
>
> return (l == LRU_INACTIVE_FILE || l == LRU_ACTIVE_FILE)
>
> and just deal with it.
>
> Your version of the code is correct and probably faster, but not as
> easy to read and probably not in a hot path :)

Sure. Whatever you think will fly...

Lee
>



\
 
 \ /
  Last update: 2008-01-11 20:53    [W:0.141 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site