lkml.org 
[lkml]   [2001]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] filemap.c fixes

On Mon, 14 May 2001, Rik van Riel wrote:

> On Mon, 14 May 2001, Daniel Phillips wrote:
> >
> > How about:
> >
> > > + if (PageActive(page))
> > > + SetPageReferenced(page);
> > > + else
> > > + activate_page(page);
>
> Fine with me ...

Now, please explain to me why it's not just a simple

SetPageReferenced(page);

and then just moving it lazily from one queue to another..

Advantage: fast and robust. Very simple.

Disadvantage: lazy queue movement. But we're already doing that for other
things (ie page_launder() already has the logic to move pages with counts
and references to the active list). So this is nothing new.

The advantage of doing the work lazily is not just simplicity: it's
actually much _faster_ to delay the work until later, because in many
cases the work never needs to be done at all (ie we might not be low on
memory, or the page ends up being moved for other reasons anyway).

Comments?

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:53    [W:0.045 / U:0.996 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site