lkml.org 
[lkml]   [2008]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 03/19] define page_file_cache() function
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



\
 
 \ /
  Last update: 2008-01-09 05:27    [W:0.054 / U:5.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site