You are not logged in.
I tried to install Haswell optimized linux-ck. Systems always freezes at boot, after kernel and init ram disk are loaded. After some time of troubleshooting I've tried generic linux-ck kernel and it works.
My question is, why Haswell optimized linux-ck doesn't work on Haswell CPU - Intel G3258?
$ gcc -c -Q -march=native --help=target | grep march
-march= haswell $ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 60
model name : Intel(R) Pentium(R) CPU G3258 @ 3.20GHz
stepping : 3
microcode : 0x7
cpu MHz : 800.000
cache size : 3072 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
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 pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer xsave rdrand lahf_lm abm arat pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust erms invpcid xsaveopt
bugs :
bogomips : 6400.16
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 1
... again same info ... Just algorithmic and OpenGL programmer running on:
Laptop: HP ProBook 4530s OS: Manjaro Linux (x86_64) DE: GNOME
PC: Intel G3258, 8GB RAM with Geforce 750Ti 2GB on MSI H81M-P33 in FractalDesign Node 804
OS: ArchLinux (x86_64) WM: i3 DM: SLIM
Offline
My question is, why Haswell optimized linux-ck doesn't work on Haswell CPU - Intel G3258?
Despite being labeled as such, it doesn't have the full Haswell feature set. Among other things, AVX and AVX2 are missing. If the compiler generated code which uses AVX/AVX2 instructions, their lack can definitely cause the kernel not to boot.
Compare your cpu flags to mine:
$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 60
model name : Intel(R) Core(TM) i5-4570S CPU @ 2.90GHz
stepping : 3
microcode : 0x1c
cpu MHz : 799.992
cache size : 6144 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
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 pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt
bugs :
bogomips : 5786.63
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
processor : 1
...Offline
@OP - That is interesting. I think Gusar is on to something for your particular hardware. I know that the "pentium" series are lacking certain features (virtualization for example). I guess you have shown that some instruction sets are also missing from them. In any case, I think the solution is to use the generic packages.
Offline
I see that. My CPU lacks these flags:
smx fma x2apic aes avx f16c ida bmi1 avx2 smep bmi2So, packages have misleading names. From Haswell wiki:
All models support: MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, F16C, BMI1 (Bit Manipulation Instructions1)+BMI2, Enhanced Intel SpeedStep Technology (EIST), Intel 64, XD bit (an NX bit implementation), Intel VT-x, and Smart Cache
Core i3, i5 and i7 support AVX, AVX2, FMA3 and AES-NI
BTW: I see quite improvement with Linux responsiveness when using linux-ck, especially while having high disk load. Also, little bit faster start of software. Boot time remains same as with stock kernel. (I haven't tried gaming performance - didn't have time for that yet).
However, I'd like to use CPU optimized kernel. To gain more performance and fully utilize my CPU. Is there any easy way to do that?
Just algorithmic and OpenGL programmer running on:
Laptop: HP ProBook 4530s OS: Manjaro Linux (x86_64) DE: GNOME
PC: Intel G3258, 8GB RAM with Geforce 750Ti 2GB on MSI H81M-P33 in FractalDesign Node 804
OS: ArchLinux (x86_64) WM: i3 DM: SLIM
Offline
However, I'd like to use CPU optimized kernel. To gain more performance and fully utilize my CPU. Is there any easy way to do that?
The only way is to compile yourself, as I kinda doubt graysky is willing to make separate packages for Pentium and Core i3/i5/i7. Though I seriously doubt you'll notice any difference, so I personally wouldn't bother. The difference you see now with the generic CK kernel comes from the BFS scheduler and other tweaks in the CK patchset, not from any specific compiler flags. Applications that do see a measurable performance increase from AVX2 and company (mostly audio/video codecs) get it from hand-written assembly, not from compiler flags.
Offline
You can try to compile it using the native flag and see what gcc gives you. I would guess it will detect Haswell and you won't boot but try it and see.
Offline
Though I seriously doubt you'll notice any difference, so I personally wouldn't bother. The difference you see now with the generic CK kernel comes from the BFS scheduler and other tweaks in the CK patchset, not from any specific compiler flags. Applications that do see a measurable performance increase from AVX2 and company (mostly audio/video codecs) get it from hand-written assembly, not from compiler flags.
So, you say that kernel won't utilize instructions that Haswell(general not i-series) provides?
You can try to compile it using the native flag and see what gcc gives you. I would guess it will detect Haswell and you won't boot but try it and see.
Is there way, to make gcc only print instruction extensions which will it compile with? So I don't need to compile whole kernel, just list instructions that would be used in compilation and compare them with instructions my CPU supports.
Just algorithmic and OpenGL programmer running on:
Laptop: HP ProBook 4530s OS: Manjaro Linux (x86_64) DE: GNOME
PC: Intel G3258, 8GB RAM with Geforce 750Ti 2GB on MSI H81M-P33 in FractalDesign Node 804
OS: ArchLinux (x86_64) WM: i3 DM: SLIM
Offline
Don't think so... Just compile it, shouldn't take you that long with a 3.2 GHz dual core... Maybe an hour or less. You can modprobed-db to make it even faster for testing purposes, just make sure you capture all the needed modules. See the wiki or man page.
Offline
So, you say that kernel won't utilize instructions that Haswell(general not i-series) provides?
It's not about the kernel itself, it's about the code generated by the compiler. When instructed to do so, gcc will generate code that utilizes these instructions, but not in a way that will measurably increase performance. Compilers simply aren't good enough. That's why multimedia developers write assembly code, rather than relying on the compiler.
BTW, the kernel itself explicitly uses these instructions only in the encryption code, for example there's CONFIG_CRYPTO_TWOFISH_AVX_X86_64. But this doesn't require any special compiler flags or special builds, the stock Arch kernel already has these activated - this too uses hand-written assembly, just like with multimedia codecs.
Offline