lkml.org 
[lkml]   [2001]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: page_launder() bug


On Mon, 7 May 2001, Linus Torvalds wrote:

>
> On Mon, 7 May 2001, Marcelo Tosatti wrote:
> >
> > So what about moving the check for a dead swap cache page from
> > swap_writepage() to page_launder() (+ PageSwapCache() check) just before
> > the "if (!launder_loop)" ?
> >
> > Yes, its ugly special casing. Any other suggestion ?
>
> My most favourite approach by far is to just remove the magic for
> different writepage's altogether, and just unconditionally do a
> writepage. But passing in enough information so that the writepage can
> come to the right decision.
>
> So take the old code, and remove the code that does
>
> if (!launder_loop) {
> .. move to head ..
> continue;
> }
> writepage(page);
>
> and instead make it do something like
>
> if (writepage(page, launderloop)) {
> .. not able to write, move to head ..
> continue;
> }
>
> where "launderloop" is passed in to the writepage function as a priority.

There are two issues which I missed yesterday: we have to get a reference
on the page, mark it clean, drop the locks and then call writepage(). If
the writepage() fails, we'll have to set_page_dirty(page).

I guess this is too much overhead for the common case, don't you?

-
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:52    [W:0.084 / U:2.808 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site