Re: [PATCH] mm: implement WasActive page flag (for improvingcleancache)

From: Andrew Morton
Date: Thu Jan 26 2012 - 19:31:50 EST


On Thu, 26 Jan 2012 13:28:02 -0800 (PST)
Dan Magenheimer <dan.magenheimer@xxxxxxxxxx> wrote:

> > I do think it also needs to get cleared on the way in to the page
> > allocator. Otherwise:
> >
> > PageSetWasActive(page);
> > free_page(page);
> > ...
> > another_user_page = get_free_page()
> > // now cleancache sees the active bit for the prev user
> >
> > Or am I missing somewhere it gets cleared non-explicitly somewhere?
>
> True, it is not getting cleared and it should be, good catch!

It should be added to PAGE_FLAGS_CHECK_AT_FREE.

> I'll find the place to add the call to ClearPageWasActive() for v2.

AFAICT this patch consumes our second-last page flag, or close to it.
We'll all be breaking out in hysterics when the final one is gone.

This does appear to be a make or break thing for cleancache - if we
can't fix https://lkml.org/lkml/2012/1/22/61 then cleancache is pretty
much a dead duck. But I'm going to ask for great effort to avoid
consuming another page flag. Either fix cleancache via other means or,
much less desirably, find an existing page flag and overload it.

And I'm afraid that neither I nor other MM developers are likely to
help you with "fix cleancache via other means" because we weren't
provided with any description of what the problem is within cleancache,
nor how it will be fixed. All we are given is the assertion "cleancache
needs this".
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/