]> git.baikalelectronics.ru Git - kernel.git/commit
mm: raise MemFree by reverting percpu_pagelist_fraction to 0
authorHugh Dickins <hughd@google.com>
Fri, 11 May 2012 08:00:07 +0000 (01:00 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 11 May 2012 16:23:39 +0000 (09:23 -0700)
commitcf177478a81f30e25653510663a175a58466e237
tree5c7bee2e8a5333e9f99b64287d587a026386459e
parent22ca77cc6b817096e7f7b56610da35d95bf55d4a
mm: raise MemFree by reverting percpu_pagelist_fraction to 0

Why is there less MemFree than there used to be?  It perturbed a test,
so I've just been bisecting linux-next, and now find the offender went
upstream yesterday.

Commit 022b24d0d472 "mm: fix division by 0 in percpu_pagelist_fraction()"
mistakenly initialized percpu_pagelist_fraction to the sysctl's minimum 8,
which leaves 1/8th of memory on percpu lists (on each cpu??); but most of
us expect it to be left unset at 0 (and it's not then used as a divisor).

  MemTotal: 8061476kB  8061476kB  8061476kB  8061476kB  8061476kB  8061476kB
  Repetitive test with percpu_pagelist_fraction 8:
  MemFree:  6948420kB  6237172kB  6949696kB  6840692kB  6949048kB  6862984kB
  Same test with percpu_pagelist_fraction back to 0:
  MemFree:  7945000kB  7944908kB  7948568kB  7949060kB  7948796kB  7948812kB

Signed-off-by: Hugh Dickins <hughd@google.com>
[ We really should fix the crazy sysctl interface too, but that's a
  separate thing - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c