Re: question about do_anonymous_page()

From: Hugh Dickins
Date: Fri Aug 08 2008 - 04:51:58 EST


On Fri, 8 Aug 2008, Francis Moreau wrote:
> On Fri, Aug 8, 2008 at 10:01 AM, Francis Moreau <francis.moro@xxxxxxxxx> wrote:
> >
> > I'm wondering why do_anonymous_page() calls lru_cache_add_active(page)
> > where page does not belong to the page cache ?
> >
> > Is it simply because lru_add_active() doesn't exist ?

Yes.

It just happens that whoever (Rik?) originally named that function was
primarily thinking of the page cache at the time; or perhaps wasn't
thinking of the file page cache at all, just regarding all the pages
we put on that list as cached in some sense.

You're right that it's a little anomalous, but nothing to worry about.
I get more bothered by page_cache_get(), which is and always(?) has
been the same thing as get_page(): sometimes we use one, sometimes
the other, and often we use page_cache_get() on anonymous pages.

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