Re: page_launder() bug

Marcelo Tosatti (marcelo@conectiva.com.br)
Wed, 9 May 2001 16:50:18 -0300 (BRT)


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.

-
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/