Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
which processor family should I select?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Wed Oct 10, 2012 10:13 am    Post subject: which processor family should I select? Reply with quote

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
View user's profile Send private message
Catanduva
Tux's lil' helper
Tux's lil' helper


Joined: 25 Dec 2008
Posts: 77
Location: Brazil

PostPosted: Wed Oct 10, 2012 4:14 pm    Post subject: Reply with quote

I'm getting an i5 ivy bridge tomorrow. Same question here.
Back to top
View user's profile Send private message
kimmie
Guru
Guru


Joined: 08 Sep 2004
Posts: 531
Location: Australia

PostPosted: Wed Oct 10, 2012 4:30 pm    Post subject: Reply with quote

You want core2 / newer Xeon
Back to top
View user's profile Send private message
duderonomy
Guru
Guru


Joined: 20 Mar 2004
Posts: 349
Location: SF Bay Area

PostPosted: Wed Oct 10, 2012 11:06 pm    Post subject: Reply with quote

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
:D
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Thu Oct 11, 2012 8:26 am    Post subject: Reply with quote

kimmie wrote:
You want core2 / newer Xeon


Yes, that's what I ended up selecting. I looked also in the help of the selection and it seemed better, but I don't have a more based reason. If you have a good reason, I will be glad to know.

I also checked safe cflags which gave some hints too.
http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel#Core_2_Duo.2FQuad.2C_Xeon_51xx.2F53xx.2F54xx.2F3360.2C_Pentium_Dual-Core_T23xx.2B.2FExxxx.2C_Celeron_Dual-Core
http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel#Core_i7_and_Core_i5.2C_Xeon_55xx

Too bad they didn't update the site for Ivy bridge. model 58 doesn't appear there yet.
Back to top
View user's profile Send private message
kimmie
Guru
Guru


Joined: 08 Sep 2004
Posts: 531
Location: Australia

PostPosted: Thu Oct 11, 2012 12:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Thu Oct 11, 2012 2:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
kimmie
Guru
Guru


Joined: 08 Sep 2004
Posts: 531
Location: Australia

PostPosted: Thu Oct 11, 2012 2:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Oct 11, 2012 4:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
duderonomy
Guru
Guru


Joined: 20 Mar 2004
Posts: 349
Location: SF Bay Area

PostPosted: Fri Oct 12, 2012 7:33 am    Post subject: Reply with quote

khayyam wrote:
Code:
gcc '-###' -e -v -march=native /usr/include/stdlib.h

Thanks for the great tip!
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Fri Oct 12, 2012 5:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Fri Oct 12, 2012 5:43 pm    Post subject: Reply with quote

kimmie wrote:
The CFLAGS you use in make.conf are not used when building the kernel.


That explains everything. Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum