From: Christoph Lameter <cl@linux-foundation.org>
To: akpm@linux-foundation.org
Cc: Pekka Enberg <penberg@cs.helsinki.fi>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org, travis@sgi.com,
Stephen Rothwell <sfr@canb.auug.org.au>,
Vegard Nossum <vegard.nossum@gmail.com>
Subject: [patch 1/7] Increase default reserve percpu area
Date: Wed, 05 Nov 2008 17:16:35 -0600 [thread overview]
Message-ID: <20081105231646.764343476@quilx.com> (raw)
In-Reply-To: <20081105231634.133252042@quilx.com>
[-- Attachment #1: cpu_alloc_increase_percpu_default --]
[-- Type: text/plain, Size: 1644 bytes --]
SLUB now requires a portion of the per cpu reserve. There are on average
about 70 real slabs on a system (aliases do not count) and each needs 12 bytes
of per cpu space. Thats 840 bytes. In debug mode all slabs will be real slabs
which will make us end up with 150 -> 1800.
Things work fine without this patch but then slub will reduce the percpu reserve
for modules.
Percpu data must be available regardless if modules are in use or not. So get
rid of the #ifdef CONFIG_MODULES.
Make the size of the percpu area dependant on the size of a machine word. That
way we have larger sizes for 64 bit machines. 64 bit machines need more percpu
memory since the pointer and counters may have double the size. Plus there is
lots of memory available on 64 bit.
Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
Index: linux-2.6/include/linux/percpu.h
===================================================================
--- linux-2.6.orig/include/linux/percpu.h 2008-11-05 12:05:46.000000000 -0600
+++ linux-2.6/include/linux/percpu.h 2008-11-05 14:29:15.000000000 -0600
@@ -44,7 +44,7 @@
extern unsigned int percpu_reserve;
/* Enough to cover all DEFINE_PER_CPUs in kernel, including modules. */
#ifndef PERCPU_AREA_SIZE
-#define PERCPU_RESERVE_SIZE 8192
+#define PERCPU_RESERVE_SIZE (sizeof(unsigned long) * 2500)
#define PERCPU_AREA_SIZE \
(__per_cpu_end - __per_cpu_start + percpu_reserve)
--
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-11-05 23:16 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-05 23:16 [patch 0/7] cpu alloc stage 2 Christoph Lameter
2008-11-05 23:16 ` Christoph Lameter [this message]
2008-11-05 23:16 ` [patch 2/7] cpu alloc: Use in slub Christoph Lameter
2008-11-05 23:16 ` [patch 3/7] cpu alloc: Remove slub fields Christoph Lameter
2008-11-05 23:16 ` [patch 4/7] cpu ops: Core piece for generic atomic per cpu operations Christoph Lameter
2008-11-06 3:58 ` Dave Chinner
2008-11-06 15:05 ` Christoph Lameter
2008-11-05 23:16 ` [patch 5/7] x86_64: Support for cpu ops Christoph Lameter
2008-11-06 7:12 ` Ingo Molnar
2008-11-06 15:08 ` Christoph Lameter
2008-11-06 15:15 ` Ingo Molnar
2008-11-06 15:44 ` Mike Travis
2008-11-06 16:27 ` Christoph Lameter
2008-11-06 16:11 ` Christoph Lameter
2008-11-05 23:16 ` [patch 6/7] VM statistics: Use CPU ops Christoph Lameter
2008-11-05 23:16 ` [patch 7/7] cpu alloc: page allocator conversion Christoph Lameter
2008-11-06 2:52 ` KOSAKI Motohiro
2008-11-06 15:04 ` Christoph Lameter
2008-11-07 0:37 ` KOSAKI Motohiro
2008-11-07 18:43 ` Christoph Lameter
2008-11-11 6:10 ` KOSAKI Motohiro
2008-11-12 2:02 ` Christoph Lameter
2008-11-11 23:56 ` [patch 0/7] cpu alloc stage 2 Andrew Morton
2008-11-12 0:28 ` Christoph Lameter
2008-11-12 6:57 ` Stephen Rothwell
2008-11-12 20:07 ` Christoph Lameter
2008-11-12 23:35 ` Stephen Rothwell
2008-11-13 14:28 ` Christoph Lameter
2008-11-13 21:09 ` Christoph Lameter
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=20081105231646.764343476@quilx.com \
--to=cl@linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@cs.helsinki.fi \
--cc=sfr@canb.auug.org.au \
--cc=travis@sgi.com \
--cc=vegard.nossum@gmail.com \
/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