lkml.org 
[lkml]   [2011]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC][PATCH 2/3] pagemap: export KPF_THP
    On Mon, Dec 19, 2011 at 07:40:47PM +0100, Andi Kleen wrote:
    > > diff --git 3.2-rc5.orig/fs/proc/page.c 3.2-rc5/fs/proc/page.c
    > > index 6d8e6a9..d436fc6 100644
    > > --- 3.2-rc5.orig/fs/proc/page.c
    > > +++ 3.2-rc5/fs/proc/page.c
    > > @@ -116,6 +116,11 @@ u64 stable_page_flags(struct page *page)
    > > if (PageHuge(page))
    > > u |= 1 << KPF_HUGE;
    > >
    > > +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
    > > + if (PageTransCompound(page))
    > > + u |= 1 << KPF_THP;
    > > +#endif
    >
    > It would be better to have PageTransCompound be a dummy (always 0)
    > for !CONFIG_TRANSPARENT_HUGEPAGE and KPF_THP always defined.

    It's already the case, that's the whole point of using
    PageTransCompound instead of PageCompound (the former defines to 0 is
    the config option is disabled).

    > This would keep ifdefery in the headers.

    Yes the #ifdef can go already.


    \
     
     \ /
      Last update: 2011-12-19 20:07    [W:0.019 / U:90.584 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site