public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: "Ozan Çağlayan" <ozan@pardus.org.tr>,
	"Alexey Dobriyan" <adobriyan@gmail.com>,
	linux-kernel@vger.kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	"Ingo Molnar" <mingo@elte.hu>
Subject: Re: [PATCH] x86: suggest running a 64bit kernel on LM capable machines with plenty memory.
Date: Tue, 10 Mar 2009 10:37:08 +0100	[thread overview]
Message-ID: <1236677828.25234.9.camel@laptop> (raw)
In-Reply-To: <20090309191504.GB11935@one.firstfloor.org>

On Mon, 2009-03-09 at 20:15 +0100, Andi Kleen wrote:
> > How about we do the below as well?
> 
> Idea looks good, but with your patch it would print two conflicting
> messages ("use highmem64. No, use 64bit instead"), wouldn't it? 
> Only one would be better.

Something like the below?


---
 arch/x86/mm/init_32.c |   26 ++++++++++++++++++++++----
 1 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index 34ef5c7..e759107 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -713,13 +713,19 @@ void __init lowmem_pfn_init(void)
 	"only %luMB highmem pages available, ignoring highmem size of %luMB!\n"
 
 #define MSG_HIGHMEM_TRIMMED \
-	"Warning: only 4GB will be used. Use a HIGHMEM64G enabled kernel!\n"
+	"Warning: only 4GB will be used. Use a %s kernel!\n"
+
+#define MSG_LM_TRIMMED \
+	"Warning: instead of using a 32bit %s kernel, Use a 64bit kernel!\n"
+
+
 /*
  * We have more RAM than fits into lowmem - we try to put it into
  * highmem, also taking the highmem=x boot parameter into account:
  */
 void __init highmem_pfn_init(void)
 {
+	char *highmem;
 	max_low_pfn = MAXMEM_PFN;
 
 	if (highmem_pages == -1)
@@ -737,16 +743,28 @@ void __init highmem_pfn_init(void)
 #ifndef CONFIG_HIGHMEM
 	/* Maximum memory usable is what is directly addressable */
 	printk(KERN_WARNING "Warning only %ldMB will be used.\n", MAXMEM>>20);
+
 	if (max_pfn > MAX_NONPAE_PFN)
-		printk(KERN_WARNING "Use a HIGHMEM64G enabled kernel.\n");
+		highmem = "HIGHMEM64G";
 	else
-		printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n");
+		highmem = "HIGHMEM";
+
+	if (boot_cpu_has(X86_FEATURE_LM))
+		printk(KERN_WARNING MSG_LM_TRIMMED, highmem);
+	else 
+		printk(KERN_WARNING "Use a %s enabled kernel.\n", highmem);
+
 	max_pfn = MAXMEM_PFN;
 #else /* !CONFIG_HIGHMEM */
 #ifndef CONFIG_HIGHMEM64G
 	if (max_pfn > MAX_NONPAE_PFN) {
 		max_pfn = MAX_NONPAE_PFN;
-		printk(KERN_WARNING MSG_HIGHMEM_TRIMMED);
+		if (boot_cpu_has(X86_FEATURE_LM))
+			highmem = "64bit";
+		else
+			highmem = "HIGHMEM64G enabled";
+
+		printk(KERN_WARNING MSG_HIGHMEM_TRIMMED, highmem);
 	}
 #endif /* !CONFIG_HIGHMEM64G */
 #endif /* !CONFIG_HIGHMEM */



  reply	other threads:[~2009-03-10  9:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-07 11:04 [RFC] A simple way to determine if the kernel needs HIGHMEM64G to be able to use all the installed memory Ozan Çağlayan
2009-03-07 19:30 ` Alexey Dobriyan
2009-03-07 19:43   ` Ozan Çağlayan
2009-03-08 20:20     ` Andi Kleen
2009-03-09 13:42       ` [PATCH] x86: suggest running a 64bit kernel on LM capable machines with plenty memory Peter Zijlstra
2009-03-09 19:15         ` Andi Kleen
2009-03-10  9:37           ` Peter Zijlstra [this message]
2009-03-10 12:50             ` Andi Kleen
2009-03-10 13:21             ` Arjan van de Ven
2009-03-11 12:01               ` Peter Zijlstra
2009-03-11 12:38                 ` Andi Kleen
2009-03-11 11:47             ` Ingo Molnar

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=1236677828.25234.9.camel@laptop \
    --to=peterz@infradead.org \
    --cc=adobriyan@gmail.com \
    --cc=andi@firstfloor.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=ozan@pardus.org.tr \
    /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