Re: [patch 03/19] define page_file_cache() function

KAMEZAWA Hiroyuki
2008-01-09T04:24:01Z

On Tue, 8 Jan 2008 17:28:56 -0500
Rik van Riel <riel@redhat.com> wrote:

> On Tue, 8 Jan 2008 14:18:40 -0800 (PST)
> Christoph Lameter <clameter@sgi.com> wrote:
>
> > On Tue, 8 Jan 2008, Rik van Riel wrote:
> >
> > > Define page_file_cache() function to answer the question:
> > > is page backed by a file?
> >
> > > +static inline int page_file_cache(struct page *page)
> > > +{
> > > + if (PageSwapBacked(page))
> > > + return 0;
> >
> > Could we call this PageNotFileBacked or so? PageSwapBacked is true for
> > pages that are RAM based. Its a bit confusing.
>
> PageNotFileBacked confuses me a little, since shared memory segments live
> in tmpfs and are kinda sorta file backed, but go to swap instead of to a
> filesystem when there is memory pressure.
>
How about PageIsNotCache() ? :)

When a page is a cache, there is an original data somewhere and can be dropped
out.

Thanks,
-Kame