From: Tejun Heo <tj@kernel.org>
To: mingo@redhat.com, tglx@linutronix.de, hpa@zytor.com,
cl@linux-foundation.org, yinghai@kernel.org
Cc: torvalds@linux-foundation.org, aarcange@redhat.com,
linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>
Subject: [PATCH 2/4] x86-32: Increment SECTION_SIZE_BITS to 30 when X86_PAE
Date: Thu, 31 Mar 2011 20:02:44 +0200 [thread overview]
Message-ID: <1301594566-10139-3-git-send-email-tj@kernel.org> (raw)
In-Reply-To: <1301594566-10139-1-git-send-email-tj@kernel.org>
When X86_PAE is enabled, SECTION_SIZE_BITS is 29 and MAX_PHYSADDR_BITS
36 making SECTIONS_WIDTH 7, which is different from !X86_PAE case
where the width is 6. On x86, when all the related options are
enabled, NR_PAGEFLAGS reaches 26 and thus can accomodate only 6 more
bits, not 7.
This direcrepancy leads to confusing Kconfig restrictions like
disabling of ARCH_SUPPORTS_MEMORY_FAILURE depending on combinations of
options.
This patch bumps SECTION_SIZE_BITS to 30 when X86_PAE. This change
increases sparse memory model granuality from 512MiB to 1GiB which in
turn can increase the amount of wasted memory in memmap when the
memory sections aren't aligned. The amount of wastage can be a few
MiB per unaligned section.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/include/asm/sparsemem.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/include/asm/sparsemem.h b/arch/x86/include/asm/sparsemem.h
index 4517d6b..71b8671 100644
--- a/arch/x86/include/asm/sparsemem.h
+++ b/arch/x86/include/asm/sparsemem.h
@@ -16,7 +16,7 @@
#ifdef CONFIG_X86_32
# ifdef CONFIG_X86_PAE
-# define SECTION_SIZE_BITS 29
+# define SECTION_SIZE_BITS 30
# define MAX_PHYSADDR_BITS 36
# define MAX_PHYSMEM_BITS 36
# else
--
1.7.1
next prev parent reply other threads:[~2011-03-31 18:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-31 18:02 [RFC PATCHSET tip:x86/mm] Remove DISCONTIGMEM support from x86-32 Tejun Heo
2011-03-31 18:02 ` [PATCH 1/4] x86: Clean up memory model related configs in arch/x86/Kconfig Tejun Heo
2011-03-31 19:48 ` Christoph Lameter
2011-03-31 18:02 ` Tejun Heo [this message]
2011-03-31 18:02 ` [PATCH 3/4] x86-32: Remove restrictions on ARCH_SUPPORTS_MEMORY_FAILURE Tejun Heo
2011-03-31 18:02 ` [PATCH 4/4] x86-32, NUMA: Remove support for DISCONTIGMEM Tejun Heo
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=1301594566-10139-3-git-send-email-tj@kernel.org \
--to=tj@kernel.org \
--cc=aarcange@redhat.com \
--cc=cl@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=yinghai@kernel.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