Re: page_launder() bug

Marcelo Tosatti
2001-05-09T21:29:07Z

On Wed, 9 May 2001, David S. Miller wrote:

>
> Marcelo Tosatti writes:
> > > Let me state it a different way, how is the new writepage() framework
> > > going to do things like ignore the referenced bit during page_launder
> > > for dead swap pages?
> >
> > Its not able to ignore the referenced bit.
> >
> > I know we want that, but I can't see any clean way of doing that.
>
> Unfortunately, one way would involve pushing the referenced bit check
> into the writepage() method. But that is the only place we have the
> kind of information necessary to make these decisions.
>
> This is exactly the kind of issue Linus and myself were talking
> about when the "cost analysis" parts of thie discussion began.

I'm not convinced that moving the referenced bit check inside writepage()
is worth it. We will duplicate code which is purely a VM job (ie check the
referenced bit and possibly remove the page from the inactive dirty list
and add it to the active list, _with_ the pagemap_lru_lock held), not a
pager job.

The PageDirty bit handling is different IMHO --- the pager is the one who
knows if it actually wrote the page or not.