]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm, hugetlbfs: optimize when NUMA=n
authorDave Hansen <dave.hansen@linux.intel.com>
Wed, 21 Oct 2015 22:03:19 +0000 (09:03 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Oct 2015 22:03:19 +0000 (09:03 +1100)
commit22fc6c67730502823f8bb35afab8f31857d6c599
tree789cd6e57c181d8f9377e03b792bd1c4ea2ce447
parentc348de2733270eb8dab1e462ef92f2148789f1a5
mm, hugetlbfs: optimize when NUMA=n

My recent patch "mm, hugetlb: use memory policy when available" added some
bloat to hugetlb.o.  This patch aims to get some of the bloat back,
especially when NUMA is not in play.

It does this with an implicit #ifdef and marking some things static that
should have been static in my first patch.  It also makes the warnings
only VM_WARN_ON()s.  They were responsible for a pretty big chunk of the
bloat.

Doing this gets our NUMA=n text size back to a wee bit _below_ where we
started before the original patch.

It also shaves a bit of space off the NUMA=y case, but not much.
Enforcing the mempolicy definitely takes some text and it's hard to avoid.

size(1) output:

   text    data     bss     dec     hex filename
  30745    3433    2492   36670    8f3e hugetlb.o.nonuma.baseline
  31305    3755    2492   37552    92b0 hugetlb.o.nonuma.patch1
  30713    3433    2492   36638    8f1e hugetlb.o.nonuma.patch2 (this patch)
  25235     473   41276   66984   105a8 hugetlb.o.numa.baseline
  25715     475   41276   67466   1078a hugetlb.o.numa.patch1
  25491     473   41276   67240   106a8 hugetlb.o.numa.patch2 (this patch)

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Hillf Danton <hillf.zj@alibaba-inc.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb.c