Re: [PATCH] pagemap: fix wrong KPF_THP on slab pages

2012-09-26 Thread Naoya Horiguchi
On Wed, Sep 26, 2012 at 03:38:41PM +0800, Fengguang Wu wrote: > On Wed, Sep 26, 2012 at 02:06:08AM -0400, Naoya Horiguchi wrote: > > On Wed, Sep 26, 2012 at 12:02:34AM -0400, Naoya Horiguchi wrote: > > ... > > > > > + * page is a thp, not a non-huge compound page. > > > > > + */ > > > > >

Re: [PATCH] pagemap: fix wrong KPF_THP on slab pages

2012-09-26 Thread Fengguang Wu
On Wed, Sep 26, 2012 at 02:06:08AM -0400, Naoya Horiguchi wrote: > On Wed, Sep 26, 2012 at 12:02:34AM -0400, Naoya Horiguchi wrote: > ... > > > > +* page is a thp, not a non-huge compound page. > > > > +*/ > > > > + else if (PageTransCompound(page) && !PageSlab(page)) > > > >

Re: [PATCH] pagemap: fix wrong KPF_THP on slab pages

2012-09-25 Thread Naoya Horiguchi
On Wed, Sep 26, 2012 at 12:02:34AM -0400, Naoya Horiguchi wrote: ... > > > + * page is a thp, not a non-huge compound page. > > > + */ > > > + else if (PageTransCompound(page) && !PageSlab(page)) > > > u |= 1 << KPF_THP; > > > > Good catch! > > > > Will this report THP for the various

Re: [PATCH] pagemap: fix wrong KPF_THP on slab pages

2012-09-25 Thread Naoya Horiguchi
On Wed, Sep 26, 2012 at 10:47:54AM +0800, Fengguang Wu wrote: > On Tue, Sep 25, 2012 at 10:06:08PM -0400, Naoya Horiguchi wrote: > > On Tue, Sep 25, 2012 at 05:20:48PM -0700, David Rientjes wrote: > > > On Tue, 25 Sep 2012, Naoya Horiguchi wrote: > > > > > > > KPF_THP can be set on non-huge compou

Re: [PATCH] pagemap: fix wrong KPF_THP on slab pages

2012-09-25 Thread Fengguang Wu
On Tue, Sep 25, 2012 at 10:06:08PM -0400, Naoya Horiguchi wrote: > On Tue, Sep 25, 2012 at 05:20:48PM -0700, David Rientjes wrote: > > On Tue, 25 Sep 2012, Naoya Horiguchi wrote: > > > > > KPF_THP can be set on non-huge compound pages like slab pages, because > > > PageTransCompound only sees PG_h

Re: [PATCH] pagemap: fix wrong KPF_THP on slab pages

2012-09-25 Thread David Rientjes
On Tue, 25 Sep 2012, Naoya Horiguchi wrote: > KPF_THP can be set on non-huge compound pages like slab pages, because > PageTransCompound only sees PG_head and PG_tail. Obviously this is a bug > and breaks user space applications which look for thp via /proc/kpageflags. > This patch rules out setti

Re: [PATCH] pagemap: fix wrong KPF_THP on slab pages

2012-09-25 Thread Naoya Horiguchi
On Tue, Sep 25, 2012 at 05:20:48PM -0700, David Rientjes wrote: > On Tue, 25 Sep 2012, Naoya Horiguchi wrote: > > > KPF_THP can be set on non-huge compound pages like slab pages, because > > PageTransCompound only sees PG_head and PG_tail. Obviously this is a bug > > and breaks user space applicat

Re: [PATCH] pagemap: fix wrong KPF_THP on slab pages

2012-09-25 Thread David Rientjes
On Tue, 25 Sep 2012, Naoya Horiguchi wrote: > KPF_THP can be set on non-huge compound pages like slab pages, because > PageTransCompound only sees PG_head and PG_tail. Obviously this is a bug > and breaks user space applications which look for thp via /proc/kpageflags. > Currently thp is construct

Re: [PATCH] pagemap: fix wrong KPF_THP on slab pages

2012-09-25 Thread KOSAKI Motohiro
On Tue, Sep 25, 2012 at 1:05 PM, Naoya Horiguchi wrote: > On Tue, Sep 25, 2012 at 11:59:51AM -0400, KOSAKI Motohiro wrote: >> On Tue, Sep 25, 2012 at 9:56 AM, Naoya Horiguchi >> wrote: >> > KPF_THP can be set on non-huge compound pages like slab pages, because >> > PageTransCompound only sees PG_

Re: [PATCH] pagemap: fix wrong KPF_THP on slab pages

2012-09-25 Thread Naoya Horiguchi
On Tue, Sep 25, 2012 at 11:59:51AM -0400, KOSAKI Motohiro wrote: > On Tue, Sep 25, 2012 at 9:56 AM, Naoya Horiguchi > wrote: > > KPF_THP can be set on non-huge compound pages like slab pages, because > > PageTransCompound only sees PG_head and PG_tail. Obviously this is a bug > > and breaks user s

Re: [PATCH] pagemap: fix wrong KPF_THP on slab pages

2012-09-25 Thread KOSAKI Motohiro
On Tue, Sep 25, 2012 at 9:56 AM, Naoya Horiguchi wrote: > KPF_THP can be set on non-huge compound pages like slab pages, because > PageTransCompound only sees PG_head and PG_tail. Obviously this is a bug > and breaks user space applications which look for thp via /proc/kpageflags. > Currently thp