linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Sasha Levin <levinsasha928@gmail.com>,
	Minchan Kim <minchan@kernel.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mm: raise MemFree by reverting percpu_pagelist_fraction to 0
Date: Fri, 11 May 2012 01:00:07 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LSU.2.00.1205110054520.2801@eggly.anvils> (raw)

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 93278814d359 "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>
---

 mm/page_alloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 3.4-rc6+/mm/page_alloc.c	2012-05-10 22:53:35.362478419 -0700
+++ linux/mm/page_alloc.c	2012-05-11 00:07:31.613657283 -0700
@@ -105,7 +105,7 @@ unsigned long totalreserve_pages __read_
  */
 unsigned long dirty_balance_reserve __read_mostly;
 
-int percpu_pagelist_fraction = 8;
+int percpu_pagelist_fraction;
 gfp_t gfp_allowed_mask __read_mostly = GFP_BOOT_MASK;
 
 #ifdef CONFIG_PM_SLEEP

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2012-05-11  8:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-11  8:00 Hugh Dickins [this message]
2012-05-11  8:30 ` Sasha Levin
2012-05-11  8:38   ` Minchan Kim
2012-05-11  9:01     ` Minchan Kim
2012-05-11 16:27       ` Linus Torvalds
2012-05-11 16:35         ` Sasha Levin
2012-05-11 16:54           ` Linus Torvalds
2012-05-14  8:51           ` Cong Wang
2012-05-11 14:10     ` Hugh Dickins
2012-05-14  1:51       ` Minchan Kim
2012-05-11 16:26 ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.00.1205110054520.2801@eggly.anvils \
    --to=hughd@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=levinsasha928@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox