mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: Christoph Lameter <cl@linux-foundation.org>,
	alex.shi@intel.com, Mel Gorman <mel@csn.ul.ie>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	yanmin.zhang@intel.com, tim.c.chen@intel.com
Subject: [PATCH] x86: don't clear nodes_states[N_NORMAL_MEMORY] when numa is not compiled in -v2
Date: Wed, 08 Jul 2009 09:50:19 -0700	[thread overview]
Message-ID: <4A54CE4B.9080403@kernel.org> (raw)
In-Reply-To: <alpine.DEB.1.10.0907021003450.16359@gentwo.org>



Alex found:
for x86_64 machine the specjbb2005 still can not run with hugepage

only happens when numa is not compiled in

the root cause: node_set_state will not set it back for us in that case

so don't clear that when numa is not select in config

v2: use node_clear_state instead

Reported-and-Tested-by: Alex Shi <alex.shi@intel.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 arch/x86/mm/init_64.c |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Index: linux-2.6/arch/x86/mm/init_64.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/init_64.c
+++ linux-2.6/arch/x86/mm/init_64.c
@@ -598,8 +598,15 @@ void __init paging_init(void)
 
 	sparse_memory_present_with_active_regions(MAX_NUMNODES);
 	sparse_init();
-	/* clear the default setting with node 0 */
-	nodes_clear(node_states[N_NORMAL_MEMORY]);
+
+	/*
+	 * clear the default setting with node 0
+	 * note: don't use nodes_clear here, that is really clearing when
+	 *	 numa support is not compiled in, and later node_set_state
+	 *	 will not set it back.
+	 */
+	node_clear_state(0, N_NORMAL_MEMORY);
+
 	free_area_init_nodes(max_zone_pfns);
 }
 


  parent reply	other threads:[~2009-07-08 16:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-13690-10286@http.bugzilla.kernel.org/>
2009-07-02  1:34 ` [Bugme-new] [Bug 13690] New: nodes_clear cause hugepage unusable on non-NUMA machine Andrew Morton
2009-07-02  2:14   ` Yinghai Lu
2009-07-02  6:45     ` Alex Shi
2009-07-02  8:50       ` Yinghai Lu
2009-07-02 14:11         ` Christoph Lameter
2009-07-02 18:04           ` [PATCH] x86: don't clear nodes_states[N_NORMAL_MEMORY] when numa is not compiled in -v2 Yinghai Lu
2009-07-03 15:39           ` [Bugme-new] [Bug 13690] New: nodes_clear cause hugepage unusable on non-NUMA machine Yinghai Lu
2009-07-08 16:50           ` Yinghai Lu [this message]
2009-07-08 17:16             ` [PATCH] x86: don't clear nodes_states[N_NORMAL_MEMORY] when numa is not compiled in -v2 Christoph Lameter
2009-07-02 14:12         ` [Bugme-new] [Bug 13690] New: nodes_clear cause hugepage unusable on non-NUMA machine Shi, Alex
2009-07-06  3:13         ` Alex Shi
2009-07-07  0:07           ` Yinghai Lu
2009-07-07  7:23             ` Alex Shi

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=4A54CE4B.9080403@kernel.org \
    --to=yinghai@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=alex.shi@intel.com \
    --cc=cl@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mel@csn.ul.ie \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=tim.c.chen@intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=yanmin.zhang@intel.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

Powered by JetHome