Skip to content

Commit 1b76b02

Browse files
Hugh Dickinstorvalds
authored andcommitted
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 9327881 "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 <[email protected]> [ We really should fix the crazy sysctl interface too, but that's a separate thing - Linus ] Signed-off-by: Linus Torvalds <[email protected]>
1 parent d60b9c1 commit 1b76b02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/page_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ unsigned long totalreserve_pages __read_mostly;
105105
*/
106106
unsigned long dirty_balance_reserve __read_mostly;
107107

108-
int percpu_pagelist_fraction = 8;
108+
int percpu_pagelist_fraction;
109109
gfp_t gfp_allowed_mask __read_mostly = GFP_BOOT_MASK;
110110

111111
#ifdef CONFIG_PM_SLEEP

0 commit comments

Comments
 (0)