lkml.org 
[lkml]   [2009]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/7] proc: export more page flags in /proc/kpageflags
On Thu, May 07, 2009 at 10:48:55AM +0800, KOSAKI Motohiro wrote:
> > On Thu, May 07, 2009 at 10:40:16AM +0800, Minchan Kim wrote:
> > > On Thu, 07 May 2009 09:21:21 +0800
> > > Wu Fengguang <fengguang.wu@intel.com> wrote:
> > >
> > > > + * pseudo flags for the well known (anonymous) memory mapped pages
> > > > + */
> > > > + if (!PageSlab(page) && page_mapped(page))
> > > > + u |= 1 << KPF_MMAP;
> > > > + if (PageAnon(page))
> > > > + u |= 1 << KPF_ANON;
> > >
> > > Why do you check PageSlab on user pages ?
> > > Is there any case that PageSlab == true && page_mapped == true ?
> >
> > Yes at least for SLUB: it reuses page->_mapcount, so page_mapped() is
> > meaningless for slab pages.
>
> this question and answer implies more comment required...

Good point. Updated comment to:

/*
* pseudo flags for the well known (anonymous) memory mapped pages
*
* Note that page->_mapcount is overloaded in SLOB/SLUB/SLQB, so the
* simple test in page_mapped() is not enough.
*/
if (!PageSlab(page) && page_mapped(page))
u |= 1 << KPF_MMAP;


Thanks,
Fengguang


\
 
 \ /
  Last update: 2009-05-07 05:09    [W:0.034 / U:0.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site