View previous topic :: View next topic |
Author |
Message |
Holysword l33t
Joined: 19 Nov 2006 Posts: 946 Location: Greece
|
Posted: Sat Jan 16, 2016 12:22 pm Post subject: Skylake CFLAGS |
|
|
Hey there,
What CFLAGS have you guys been using for Skylake? I just got mine and I couldn't find info about it anywhere. Is march=core2 fine or will I be missing out a lot?
This is what I got previously (though I have no idea where I got it from...)
Code: | ABI_X86="32 64"
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=core2"
CFLAGS="${CFLAGS} -msse4"
CFLAGS="${CFLAGS} -mcx16"
CFLAGS="${CFLAGS} -msahf"
CFLAGS="${CFLAGS} -O2"
CFLAGS="${CFLAGS} -pipe"
CXXFLAGS="${CFLAGS}"
CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" |
_________________ "Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach) |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Sat Jan 16, 2016 2:35 pm Post subject: |
|
|
See my thread here: https://forums.gentoo.org/viewtopic.php?p=7867046#7867046
I would emerge the source with the experimental flag and choose the "Native optimizations autodetected by GCC " option.
In my case I took the specific Phenom II choice, but my CPU is five years old. I've been thinking of updating to a Skylake and would definitely do as I said.
Please let us know how it works. You might also try the "Core i7" option that is also uncovered by the experimental use flag. |
|
Back to top |
|
|
Mr_Maniac Guru
Joined: 10 Jun 2004 Posts: 546
|
Posted: Sat Jan 16, 2016 3:02 pm Post subject: |
|
|
Code: | -march=native -O2 -pipe |
Should suffice. GCC will automatically use options suitable for your CPU. You can, of course, also use -O3 if you want.[/code] _________________ AMD Ryzen 5900X
64 GB DDR4 RAM
GeForce RTX 3080
Gentoo Linux (most recent stable kernel - amd64)
Windows 11 x64 |
|
Back to top |
|
|
Holysword l33t
Joined: 19 Nov 2006 Posts: 946 Location: Greece
|
Posted: Sat Jan 16, 2016 3:27 pm Post subject: |
|
|
Tony0945 wrote: | See my thread here: https://forums.gentoo.org/viewtopic.php?p=7867046#7867046
I would emerge the source with the experimental flag and choose the "Native optimizations autodetected by GCC " option.
In my case I took the specific Phenom II choice, but my CPU is five years old. I've been thinking of updating to a Skylake and would definitely do as I said.
Please let us know how it works. You might also try the "Core i7" option that is also uncovered by the experimental use flag. |
Mr_Maniac wrote: | Code: | -march=native -O2 -pipe |
Should suffice. GCC will automatically use options suitable for your CPU. You can, of course, also use -O3 if you want.[/code] |
Thanks, I will check the experimental sources later. Right now I am having trouble with a kernel panic, so I want to fix that first. Also, I loved this comment:
NeddySeagoon wrote: | As usual, if it breaks, you can keep all the pieces. |
_________________ "Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach) |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54821 Location: 56N 3W
|
Posted: Sat Jan 16, 2016 3:31 pm Post subject: |
|
|
Holysword,
Thats not original, it was inspired by
man chat: | COPYRIGHT
The chat program is in public domain. This is not the GNU public
license. If it breaks then you get to keep both pieces. |
Using -O3 system wide is a very bad idea. It enables options that can produce incorrect results in some circumstances.
It also enables options that make the binary bigger in an attempt to get faster execution. The bigger binaries are faster can be true ... up to point. When the bigger binary no longer fits into the CPU cache, it suddenly gets much slower, due to "cache thrashing".
"Cache thrashing" also occurs between concurrent tasks, when one pushes the other out of the CPU cache.
In short, use -O3 only on a package by package basis, where its known to produce correct results and you really need the speed. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Last edited by NeddySeagoon on Sat Jan 16, 2016 3:39 pm; edited 1 time in total |
|
Back to top |
|
|
Holysword l33t
Joined: 19 Nov 2006 Posts: 946 Location: Greece
|
Posted: Sat Jan 16, 2016 3:34 pm Post subject: |
|
|
NeddySeagoon wrote: | Holysword,
Thats not original, it was inspired by
man chat: | COPYRIGHT
The chat program is in public domain. This is not the GNU public
license. If it breaks then you get to keep both pieces. |
|
Living and learning, thanks for sharing! _________________ "Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach) |
|
Back to top |
|
|
ryszardzonk Apprentice
Joined: 18 Dec 2003 Posts: 225 Location: Rzeszów, POLAND
|
Posted: Tue Jan 19, 2016 11:13 am Post subject: |
|
|
NeddySeagoon wrote: | In short, use -O3 only on a package by package basis, where its known to produce correct results and you really need the speed. |
I have been using -O3 or -Ofast for several packages like multimedia libraries or app-arch, but I have read in few pleases that -O3 might be usefull for others speeding up python or sqlite, but I never found any benchmarks to confirm it. Have You found that true or perhaps know other packages that might have use of that higher CFLAGS? _________________ Sky is not the limit... |
|
Back to top |
|
|
|