* [PATCH] Mention Intel Atom in Kconfig.cpu @ 2008-10-13 10:58 Phil Endecott 2008-10-13 12:13 ` [PATCH] Mention Intel Atom in Kconfig.cpu (less garbled this time) Phil Endecott 2008-10-13 12:28 ` [PATCH] Mention Intel Atom in Kconfig.cpu Andi Kleen 0 siblings, 2 replies; 11+ messages in thread From: Phil Endecott @ 2008-10-13 10:58 UTC (permalink / raw) To: Linux Kernel Mailing List Am I right in thinking that CONFIG_MCORE2 is the correct choice for an Intel Atom? (It seems to work for me, so far.) If this is true, since there are quite a lot of these chips in circulation now and the choice is not obvious, I think it would be helpful to add something along the following lines to arch/x86/Kconfig.cpu. Signed-off-by: Phil Endecott <kconfigcpu@chezphil.org> --- diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu index b225219..7df0801 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu @@ -263,11 +263,12 @@ config MPSC in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one. config MCORE2 - bool "Core 2/newer Xeon" + bool "Core 2/newer Xeon/Atom" help - Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and 53xx) - CPUs. You can distinguish newer from older Xeons by the CPU family - in /proc/cpuinfo. Newer ones have 6 and older ones 15 (not a typo) + Select this for Intel Core 2, newer Core 2 Xeon (Xeon 51xx and 53xx) + and Intel Atom CPUs. You can distinguish newer from older Xeons by + the CPU family in /proc/cpuinfo. Newer ones have 6 and older ones 15 + (not a typo). config GENERIC_CPU bool "Generic-x86-64" ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH] Mention Intel Atom in Kconfig.cpu (less garbled this time) 2008-10-13 10:58 [PATCH] Mention Intel Atom in Kconfig.cpu Phil Endecott @ 2008-10-13 12:13 ` Phil Endecott 2008-10-13 15:36 ` J.A. Magallón 2008-10-13 12:28 ` [PATCH] Mention Intel Atom in Kconfig.cpu Andi Kleen 1 sibling, 1 reply; 11+ messages in thread From: Phil Endecott @ 2008-10-13 12:13 UTC (permalink / raw) To: Linux Kernel Mailing List [Appoligies for the garbled first attempt at posting this. Blame the original author for the long lines!?] Am I right in thinking that CONFIG_MCORE2 is the correct choice for an Intel Atom? (It seems to work for me, so far.) If this is true, since there are quite a lot of these chips in circulation now and the choice is not obvious, I think it would be helpful to add something along the following lines to arch/x86/Kconfig.cpu. Signed-off-by: Phil Endecott <kconfigcpu@chezphil.org> --- diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu index b225219..7df0801 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu @@ -263,11 +263,12 @@ config MPSC in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one. config MCORE2 - bool "Core 2/newer Xeon" + bool "Core 2/newer Xeon/Atom" help - Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and 53xx) - CPUs. You can distinguish newer from older Xeons by the CPU family - in /proc/cpuinfo. Newer ones have 6 and older ones 15 (not a typo) + Select this for Intel Core 2, newer Core 2 Xeon (Xeon 51xx and 53xx) + and Intel Atom CPUs. You can distinguish newer from older Xeons by + the CPU family in /proc/cpuinfo. Newer ones have 6 and older ones 15 + (not a typo). config GENERIC_CPU bool "Generic-x86-64" ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] Mention Intel Atom in Kconfig.cpu (less garbled this time) 2008-10-13 12:13 ` [PATCH] Mention Intel Atom in Kconfig.cpu (less garbled this time) Phil Endecott @ 2008-10-13 15:36 ` J.A. Magallón 0 siblings, 0 replies; 11+ messages in thread From: J.A. Magallón @ 2008-10-13 15:36 UTC (permalink / raw) To: Linux-Kernel On Mon, 13 Oct 2008 13:13:57 +0100, "Phil Endecott" <phil_wueww_endecott@chezphil.org> wrote: > [Appoligies for the garbled first attempt at posting this. Blame the > original author for the long lines!?] > > Am I right in thinking that CONFIG_MCORE2 is the correct choice for an > Intel Atom? (It seems to work for me, so far.) If this is true, since > there are quite a lot of these chips in circulation now and the choice > is not obvious, I think it would be helpful to add something along the > following lines to arch/x86/Kconfig.cpu. > > Signed-off-by: Phil Endecott <kconfigcpu@chezphil.org> > --- > diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu > index b225219..7df0801 100644 > --- a/arch/x86/Kconfig.cpu > +++ b/arch/x86/Kconfig.cpu > @@ -263,11 +263,12 @@ config MPSC > in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one. > > config MCORE2 > - bool "Core 2/newer Xeon" > + bool "Core 2/newer Xeon/Atom" > help > - Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and 53xx) > - CPUs. You can distinguish newer from older Xeons by the CPU family > - in /proc/cpuinfo. Newer ones have 6 and older ones 15 (not a typo) > + Select this for Intel Core 2, newer Core 2 Xeon (Xeon 51xx and 53xx) > + and Intel Atom CPUs. You can distinguish newer from older Xeons by > + the CPU family in /proc/cpuinfo. Newer ones have 6 and older ones 15 > + (not a typo). > > config GENERIC_CPU > bool "Generic-x86-64" > I think Atom is worth a separate setting. It can share some flags with other processors but has some very special features. And perhaps (I would like it) distros begin to ship special 'netbook' kernels without all the extras you don't need (raid, scsi adapters, etc...), with some tunes (iosched=nopp for SSDs...), and memory scrapping settings (NR_CPUS=2 or 4...). Some questions: - How worthy is to reduce NR_CPUS from 64 (standard in many distros) to 2 or 4 ? - Atom is an in-order processor. Intel included some flag in icc to build code with in-order scheduling, which will be the best settings in gcc ? From what I have found, apart from other things, -match=prescott is the best for Atom, wrt processor features. Perhaps the best settings are -march=prescott -mtune=generic until gcc people implement an in-order scheduler. - Anyways, what does all this matter if Makefile_32.cpu reads: cflags-$(CONFIG_MPENTIUMII) += -march=i686 $(call tune,pentium2) cflags-$(CONFIG_MPENTIUMIII) += -march=i686 $(call tune,pentium3) cflags-$(CONFIG_MPENTIUMM) += -march=i686 $(call tune,pentium3) cflags-$(CONFIG_MPENTIUM4) += -march=i686 $(call tune,pentium4) cflags-$(CONFIG_MCORE2) += -march=i686 $(call tune,core2) ie, no march=xxxx ? Why don't we use something like cflags-$(CONFIG_MCORE2) += $(call cc-option,-march=core2,-march=i686) $(call tune,core2) TIA -- J.A. Magallon <jamagallon()ono!com> \ Software is like sex: \ It's better when it's free Mandriva Linux release 2009.0 (Cooker) for i586 Linux 2.6.25-jam18 (gcc 4.3.1 20080626 (GCC) #1 SMP ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Mention Intel Atom in Kconfig.cpu 2008-10-13 10:58 [PATCH] Mention Intel Atom in Kconfig.cpu Phil Endecott 2008-10-13 12:13 ` [PATCH] Mention Intel Atom in Kconfig.cpu (less garbled this time) Phil Endecott @ 2008-10-13 12:28 ` Andi Kleen 2008-10-13 13:18 ` Arjan van de Ven 1 sibling, 1 reply; 11+ messages in thread From: Andi Kleen @ 2008-10-13 12:28 UTC (permalink / raw) To: Phil Endecott; +Cc: Linux Kernel Mailing List "Phil Endecott" <phil_wueww_endecott@chezphil.org> writes: > Am I right in thinking that CONFIG_MCORE2 is the correct choice for an > Intel Atom? No, Atom is completely different from a Core2. Right now 586 or 686 is a reasonable choice. -Andi ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Mention Intel Atom in Kconfig.cpu 2008-10-13 12:28 ` [PATCH] Mention Intel Atom in Kconfig.cpu Andi Kleen @ 2008-10-13 13:18 ` Arjan van de Ven 2008-10-13 13:30 ` Andi Kleen 0 siblings, 1 reply; 11+ messages in thread From: Arjan van de Ven @ 2008-10-13 13:18 UTC (permalink / raw) To: Andi Kleen; +Cc: Phil Endecott, Linux Kernel Mailing List On Mon, 13 Oct 2008 14:28:06 +0200 Andi Kleen <andi@firstfloor.org> wrote: > "Phil Endecott" <phil_wueww_endecott@chezphil.org> writes: > > > Am I right in thinking that CONFIG_MCORE2 is the correct choice for > > an Intel Atom? > > No, Atom is completely different from a Core2. > > Right now 586 or 686 is a reasonable choice. actually 586 is completely wrong. Core2 instruction set with tune=generic is still the best to set. -- Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Mention Intel Atom in Kconfig.cpu 2008-10-13 13:18 ` Arjan van de Ven @ 2008-10-13 13:30 ` Andi Kleen 2008-10-13 13:30 ` Arjan van de Ven 0 siblings, 1 reply; 11+ messages in thread From: Andi Kleen @ 2008-10-13 13:30 UTC (permalink / raw) To: Arjan van de Ven; +Cc: Andi Kleen, Phil Endecott, Linux Kernel Mailing List On Mon, Oct 13, 2008 at 09:18:48AM -0400, Arjan van de Ven wrote: > On Mon, 13 Oct 2008 14:28:06 +0200 > Andi Kleen <andi@firstfloor.org> wrote: > > > "Phil Endecott" <phil_wueww_endecott@chezphil.org> writes: > > > > > Am I right in thinking that CONFIG_MCORE2 is the correct choice for > > > an Intel Atom? > > > > No, Atom is completely different from a Core2. > > > > Right now 586 or 686 is a reasonable choice. > > actually 586 is completely wrong. It is nearest in scheduling at least. You'll lose CMOV, but that's not a big loss. > Core2 instruction set with tune=generic is still the best to set. Not sure that is true. These option are mostly for the compiler. -Andi -- ak@linux.intel.com ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Mention Intel Atom in Kconfig.cpu 2008-10-13 13:30 ` Andi Kleen @ 2008-10-13 13:30 ` Arjan van de Ven 2008-10-13 13:53 ` Andi Kleen 2008-10-13 14:02 ` Adrian Bunk 0 siblings, 2 replies; 11+ messages in thread From: Arjan van de Ven @ 2008-10-13 13:30 UTC (permalink / raw) To: Andi Kleen; +Cc: Andi Kleen, Phil Endecott, Linux Kernel Mailing List On Mon, 13 Oct 2008 15:30:51 +0200 Andi Kleen <andi@firstfloor.org> wrote: > > > Core2 instruction set with tune=generic is still the best to set. > > Not sure that is true. These option are mostly for the compiler. exactly, and our benchmarks show that tune=generic is best right now for Atom. (586 scheduling sounds nice, but the pipelines are rather different. And the benchmarks don't lie.. ;-) -- Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Mention Intel Atom in Kconfig.cpu 2008-10-13 13:30 ` Arjan van de Ven @ 2008-10-13 13:53 ` Andi Kleen 2008-10-13 14:02 ` Adrian Bunk 1 sibling, 0 replies; 11+ messages in thread From: Andi Kleen @ 2008-10-13 13:53 UTC (permalink / raw) To: Arjan van de Ven; +Cc: Andi Kleen, Phil Endecott, Linux Kernel Mailing List On Mon, Oct 13, 2008 at 09:30:14AM -0400, Arjan van de Ven wrote: > On Mon, 13 Oct 2008 15:30:51 +0200 > Andi Kleen <andi@firstfloor.org> wrote: > > > > > Core2 instruction set with tune=generic is still the best to set. > > > > Not sure that is true. These option are mostly for the compiler. > > exactly, and our benchmarks show that tune=generic is best right now So it doesn't matter as long as you set X86_GENERIC (and CONFIG_CC_OPTIMIZE_FOR_SIZE) It would probably make sense to add a setting for those. -Andi -- ak@linux.intel.com ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Mention Intel Atom in Kconfig.cpu 2008-10-13 13:30 ` Arjan van de Ven 2008-10-13 13:53 ` Andi Kleen @ 2008-10-13 14:02 ` Adrian Bunk 2008-10-13 14:17 ` Arjan van de Ven 1 sibling, 1 reply; 11+ messages in thread From: Adrian Bunk @ 2008-10-13 14:02 UTC (permalink / raw) To: Arjan van de Ven; +Cc: Andi Kleen, Phil Endecott, Linux Kernel Mailing List On Mon, Oct 13, 2008 at 09:30:14AM -0400, Arjan van de Ven wrote: > On Mon, 13 Oct 2008 15:30:51 +0200 > Andi Kleen <andi@firstfloor.org> wrote: > > > > > Core2 instruction set with tune=generic is still the best to set. > > > > Not sure that is true. These option are mostly for the compiler. > > exactly, and our benchmarks show that tune=generic is best right now > for Atom. > (586 scheduling sounds nice, but the pipelines are rather different. > And the benchmarks don't lie.. ;-) That sounds a bit dangerous since tune=generic is documented to change the semantics between gcc versions to better fit more recent CPUs (there's even a small difference between gcc 4.2 and gcc 4.3): As new processors are deployed in the marketplace, the behavior of this option will change. Therefore, if you upgrade to a newer version of GCC, the code generated option will change to reflect the processors that were most common when that version of GCC was released. cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Mention Intel Atom in Kconfig.cpu 2008-10-13 14:02 ` Adrian Bunk @ 2008-10-13 14:17 ` Arjan van de Ven 2008-10-13 19:22 ` Phil Endecott 0 siblings, 1 reply; 11+ messages in thread From: Arjan van de Ven @ 2008-10-13 14:17 UTC (permalink / raw) To: Adrian Bunk; +Cc: Andi Kleen, Phil Endecott, Linux Kernel Mailing List On Mon, 13 Oct 2008 17:02:30 +0300 Adrian Bunk <bunk@kernel.org> wrote: > On Mon, Oct 13, 2008 at 09:30:14AM -0400, Arjan van de Ven wrote: > > On Mon, 13 Oct 2008 15:30:51 +0200 > > Andi Kleen <andi@firstfloor.org> wrote: > > > > > > > Core2 instruction set with tune=generic is still the best to > > > > set. > > > > > > Not sure that is true. These option are mostly for the compiler. > > > > exactly, and our benchmarks show that tune=generic is best right now > > for Atom. > > (586 scheduling sounds nice, but the pipelines are rather different. > > And the benchmarks don't lie.. ;-) > > That sounds a bit dangerous since tune=generic is documented to > change the semantics between gcc versions to better fit more recent > CPUs (there's even a small difference between gcc 4.2 and gcc 4.3): > reality is that tune=generic avoids the things that are "really bad" for a wide generation of cpus; the world of x86 is such that there really are many common things that are good for the vast majority of the cpus out there (or at least neutral). Future versions of GCC might have a specific ATOM model. Until they do, tune=generic is the right thing based on tests over a few gcc versions. Yes it's a bit fluid, but no gcc isn't going to suddenly go do stupid things for currently mass-sold cpus. -- Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Mention Intel Atom in Kconfig.cpu 2008-10-13 14:17 ` Arjan van de Ven @ 2008-10-13 19:22 ` Phil Endecott 0 siblings, 0 replies; 11+ messages in thread From: Phil Endecott @ 2008-10-13 19:22 UTC (permalink / raw) To: Linux Kernel Mailing List Arjan van de Ven wrotes: > On Mon, 13 Oct 2008 17:02:30 +0300 > Adrian Bunk <bunk <at> kernel.org> wrote: > > > On Mon, Oct 13, 2008 at 09:30:14AM -0400, Arjan van de Ven wrote: > > > On Mon, 13 Oct 2008 15:30:51 +0200 > > > Andi Kleen <andi <at> firstfloor.org> wrote: > > > > > > > > > Core2 instruction set with tune=generic is still the best to > > > > > set. > > > > > > > > Not sure that is true. These option are mostly for the compiler. > > > > > > exactly, and our benchmarks show that tune=generic is best right now > > > for Atom. > > > (586 scheduling sounds nice, but the pipelines are rather different. > > > And the benchmarks don't lie.. > > > > That sounds a bit dangerous since tune=generic is documented to > > change the semantics between gcc versions to better fit more recent > > CPUs (there's even a small difference between gcc 4.2 and gcc 4.3): > > > > reality is that tune=generic avoids the things that are "really bad" > for a wide generation of cpus; the world of x86 is such that there > really are many common things that are good for the vast majority of > the cpus out there (or at least neutral). > > Future versions of GCC might have a specific ATOM model. Until they do, > tune=generic is the right thing based on tests over a few gcc versions. > Yes it's a bit fluid, but no gcc isn't going to suddenly go do stupid > things for currently mass-sold cpus. Well, if the Intel experts can't even agree, what hope do I have of getting it right :-( I chose Core2 because I read somewhere that Atom was "feature compatible" with it, but of course that doesn't say anything about the optimal optimisations. I trust that someone will update Kconfig.cpu with their idea of the right choice for Atom eventually. (Maybe there should be a way to auto-suggest the right setting for a native build based on /proc/cpuinfo? I think the gcc build process can do something like that.) Cheers, Phil. ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-10-13 19:22 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-10-13 10:58 [PATCH] Mention Intel Atom in Kconfig.cpu Phil Endecott 2008-10-13 12:13 ` [PATCH] Mention Intel Atom in Kconfig.cpu (less garbled this time) Phil Endecott 2008-10-13 15:36 ` J.A. Magallón 2008-10-13 12:28 ` [PATCH] Mention Intel Atom in Kconfig.cpu Andi Kleen 2008-10-13 13:18 ` Arjan van de Ven 2008-10-13 13:30 ` Andi Kleen 2008-10-13 13:30 ` Arjan van de Ven 2008-10-13 13:53 ` Andi Kleen 2008-10-13 14:02 ` Adrian Bunk 2008-10-13 14:17 ` Arjan van de Ven 2008-10-13 19:22 ` Phil Endecott
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox