View previous topic :: View next topic |
Author |
Message |
queen Veteran
Joined: 19 Jul 2005 Posts: 1642
|
Posted: Wed Oct 10, 2012 10:13 am Post subject: which processor family should I select? |
|
|
I am installing now a new system with cpu ivy bridge Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz
I am not sure which processor family should I select in the kernel. Core 2/newer Xeon or generic x86_64.
More details about the cpu:
Code: |
processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz
stepping : 9
microcode : 0x12
cpu MHz : 2294.894
cache size : 6144 KB
physical id : 0
siblings : 8
core id : 3
cpu cores : 4
apicid : 7
initial apicid : 7
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips : 4589.78
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
|
|
|
Back to top |
|
|
Catanduva Tux's lil' helper
Joined: 25 Dec 2008 Posts: 77 Location: Brazil
|
Posted: Wed Oct 10, 2012 4:14 pm Post subject: |
|
|
I'm getting an i5 ivy bridge tomorrow. Same question here. |
|
Back to top |
|
|
kimmie Guru
Joined: 08 Sep 2004 Posts: 531 Location: Australia
|
Posted: Wed Oct 10, 2012 4:30 pm Post subject: |
|
|
You want core2 / newer Xeon |
|
Back to top |
|
|
duderonomy Guru
Joined: 20 Mar 2004 Posts: 349 Location: SF Bay Area
|
Posted: Wed Oct 10, 2012 11:06 pm Post subject: |
|
|
kimmie wrote: | You want core2 / newer Xeon |
Really?
I have tried both "Generic-x86-64" and "Core 2/newer Xeon".
Apparently, either one works...
Where can I look the details why "Core 2/newer Xeon" is best?
I have not googled this yet.
Thx
|
|
Back to top |
|
|
queen Veteran
Joined: 19 Jul 2005 Posts: 1642
|
|
Back to top |
|
|
kimmie Guru
Joined: 08 Sep 2004 Posts: 531 Location: Australia
|
Posted: Thu Oct 11, 2012 12:30 pm Post subject: |
|
|
Basically, if you are building a 64 bit kernel, CONFIG_MCORE2 will build the kernel with gcc options -m64 -march=core2, whereas CONFIG_GENERIC_CPU will build it with -m64 -mtune=generic.
CORE2 is definitely the right one to use, as more recent i7/i5 support the core2 instructions, which are a superset of the basic amd64 instructions. Latter versions of gcc have -march=core7 available too, I think, I'm not sure if that's yet used by any kernel version.
It's hard to find this info by googling, I just looked in the kernel source for MCORE2 and also built the kernel using make V=1 to see exactly how the gcc options changed. If you set CONFIG_GENERIC_CPU, there are a few other undocumented kernel options set too, you'd have to look in the source to see what these actually do. Probably some sort of runtime detection and optimisation.
EDIT: Probably for your Ivy Bridge i7 you'll find that Processor family is 6 in /proc/cpuinfo, as described in the make menuconfig help for CONFIG_MCORE2. It certainly is for my first generation i7. |
|
Back to top |
|
|
queen Veteran
Joined: 19 Jul 2005 Posts: 1642
|
Posted: Thu Oct 11, 2012 2:07 pm Post subject: |
|
|
kimmie wrote: | Basically, if you are building a 64 bit kernel, CONFIG_MCORE2 will build the kernel with gcc options -m64 -march=core2, whereas CONFIG_GENERIC_CPU will build it with -m64 -mtune=generic.
CORE2 is definitely the right one to use, as more recent i7/i5 support the core2 instructions, which are a superset of the basic amd64 instructions. Latter versions of gcc have -march=core7 available too, I think, I'm not sure if that's yet used by any kernel version.
It's hard to find this info by googling, I just looked in the kernel source for MCORE2 and also built the kernel using make V=1 to see exactly how the gcc options changed. If you set CONFIG_GENERIC_CPU, there are a few other undocumented kernel options set too, you'd have to look in the source to see what these actually do. Probably some sort of runtime detection and optimisation.
EDIT: Probably for your Ivy Bridge i7 you'll find that Processor family is 6 in /proc/cpuinfo, as described in the make menuconfig help for CONFIG_MCORE2. It certainly is for my first generation i7. |
Yes, I assumed that generic is for all kinds of 64bit (for multi platforms). As far I saw in the kernel, there isn't -march=i7. Indeed the family is 6.See the first post of proc/cpuinfo
However, there might be some discrepancy since in the CFLAGS I selected -march=native for Ivy Bridge as suggested in other threads. I am not sure how it will behave. Ivy bridge will be supported in higher gcc versions (4.6 and higher), but so far it's full of bugs.
You have an idea how to check and see which flags actually take in place? |
|
Back to top |
|
|
kimmie Guru
Joined: 08 Sep 2004 Posts: 531 Location: Australia
|
Posted: Thu Oct 11, 2012 2:11 pm Post subject: |
|
|
The CFLAGS you use in make.conf are not used when building the kernel.
The kernel config controls the gcc options for the kernel build. If you want to see the actual gcc commands used when then kernel is built, use 'make V=1'.
I don't know what you mean by a "discrepancy". It won't matter at all if you build a kernel using generic options, and use CFLAGS="-march=native" when you build your system. |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Thu Oct 11, 2012 4:53 pm Post subject: |
|
|
queen wrote: | You have an idea how to check and see which flags actually take in place? |
queen ... you can get the flags that -march=native (or similarly with '-m64 -march=core2') will enable with the following
Code: | gcc '-###' -e -v -march=native /usr/include/stdlib.h |
best ... khay |
|
Back to top |
|
|
duderonomy Guru
Joined: 20 Mar 2004 Posts: 349 Location: SF Bay Area
|
Posted: Fri Oct 12, 2012 7:33 am Post subject: |
|
|
khayyam wrote: | Code: | gcc '-###' -e -v -march=native /usr/include/stdlib.h |
|
Thanks for the great tip! |
|
Back to top |
|
|
queen Veteran
Joined: 19 Jul 2005 Posts: 1642
|
Posted: Fri Oct 12, 2012 5:42 pm Post subject: |
|
|
khayyam wrote: | queen wrote: | You have an idea how to check and see which flags actually take in place? |
queen ... you can get the flags that -march=native (or similarly with '-m64 -march=core2') will enable with the following
Code: | gcc '-###' -e -v -march=native /usr/include/stdlib.h |
best ... khay |
Cool. Thanks a lot. |
|
Back to top |
|
|
queen Veteran
Joined: 19 Jul 2005 Posts: 1642
|
Posted: Fri Oct 12, 2012 5:43 pm Post subject: |
|
|
kimmie wrote: | The CFLAGS you use in make.conf are not used when building the kernel. |
That explains everything. Thanks. |
|
Back to top |
|
|
|