Re: [PATCH 4/7] proc: export more page flags in /proc/kpageflags

From: Wu Fengguang
Date: Wed May 06 2009 - 22:47:26 EST


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@xxxxxxxxx> 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.
--
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/