[PATCH] x86: suggest running a 64bit kernel on LM capable machineswith plenty memory.

From: Peter Zijlstra
Date: Mon Mar 09 2009 - 09:43:18 EST


On Sun, 2009-03-08 at 21:20 +0100, Andi Kleen wrote:
> Ozan ÃaÄlayan <ozan@xxxxxxxxxxxxx> writes:
> >
> > So, the PAE enabled kernel should be installed by distribution installers or
> > package management systems if the processor honors the PAE bit. Because PAE
> > is an extension mechanism for 32bit processors, AFAIK it has some overhead.
> > So enabling it if the user doesn't have a memory size >=4GB would not make
> > much sense if a proper noexecute (NX) support is not intended.
>
> The general recommendation is to always use PAE when the machine
> is NX capable. Or at least use it by default.

How about we do the below as well?

---
If the hardware is capable, its much better to run a 64bit kernel than a
32bit PAE kernel with lots of memory.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
---
arch/x86/mm/init_32.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index 34ef5c7..3d22baa 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -714,6 +714,9 @@ void __init lowmem_pfn_init(void)

#define MSG_HIGHMEM_TRIMMED \
"Warning: only 4GB will be used. Use a HIGHMEM64G enabled kernel!\n"
+
+#define MSG_LM_TRIMMED \
+ "Warning: instead of using a 32bit PAE 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:
@@ -750,6 +753,8 @@ void __init highmem_pfn_init(void)
}
#endif /* !CONFIG_HIGHMEM64G */
#endif /* !CONFIG_HIGHMEM */
+ if (boot_cpu_has(X86_FEATURE_LM))
+ printk(KERN_WARNING MSG_LM_TRIMMED);
}

/*


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/