View previous topic :: View next topic |
Author |
Message |
xprometeus n00b
Joined: 19 Jan 2004 Posts: 50
|
Posted: Sun Aug 15, 2004 2:51 pm Post subject: Kernel Flags |
|
|
Do you advice do build ,,optimized" kernel with changed flags ?
It will increase performance ?
What do you think about if add ,,-O3 -s -mcpu=pentium4 " .
Also what do you think about idea to pack /bin directory (only binaries from
3 stage ) with UPX ?
Thanks for your opinion, |
|
Back to top |
|
|
nephros Advocate
Joined: 07 Feb 2003 Posts: 2139 Location: Graz, Austria (Europe - no kangaroos.)
|
Posted: Mon Aug 16, 2004 1:29 pm Post subject: Re: Kernel Flags |
|
|
xprometeus wrote: | Do you advice do build ,,optimized" kernel with changed flags ?
It will increase performance ?
What do you think about if add ,,-O3 -s -mcpu=pentium4 " .
|
IMO:
1) Who do you think knows better how to get the most out of the kernel: Linus or you? No offense.
2) -march can be set from inside the kernel config, under "Processor Type and Features".
3) A lot of the performance-critical parts of the kernel are hand-coded assembler. Compiler options can do nothing for you there.
4) -O3 makes binaries larger. For the kernel, size is important. There is an option to compile the kernel with -Os, it is hidden under the "Remove features for embedded OSs" menu in the kernel config.
5) Bad things are known to happen when tampering with the Kernel compile flags. If you really want to, look for the HOST_CFLAGS (CXXFLAGS) in the top-level Makefile in /usr/src/linux. _________________ Please put [SOLVED] in your topic if you are a moron.
Last edited by nephros on Mon Aug 16, 2004 4:14 pm; edited 1 time in total |
|
Back to top |
|
|
djm Arch/Herd Tester
Joined: 12 Apr 2004 Posts: 690 Location: Wadham College, Oxford
|
Posted: Mon Aug 16, 2004 4:10 pm Post subject: |
|
|
You may or may not know this, but I'm sure other people don't realise this, so...
Your kernel isn't compiled with the CFLAGS in make.conf
There's a thread (probably in DT&T) on these forums telling you how to compile a kernel with CFLAGS chosen by you, but it's not worth it if you ask me... _________________ the forums.gentoo.org poster formally known as metal leper |
|
Back to top |
|
|
Gotterdammerung l33t
Joined: 11 Feb 2004 Posts: 627 Location: Rio de Janeiro, Brazil
|
Posted: Tue Aug 17, 2004 2:51 am Post subject: |
|
|
Choosing you own kernel flags is not a good thing to do. It's a better idea to use the menuconfig option and choose your cpu type, as told before. _________________ A mind that is stretched by a new experience can never go back to its old dimensions. - Oliver Wendell Holmes |
|
Back to top |
|
|
xprometeus n00b
Joined: 19 Jan 2004 Posts: 50
|
Posted: Wed Aug 18, 2004 9:34 pm Post subject: i know ... |
|
|
I know that make.conf is not relevant for builing of kernel. And I was thinking about to force ,,my flags" for kernel in Makefile. I didnt know how kernel deal with optimizations,because i thought that it dont use all possibilities to optimize (improve stability first). Well maybe my question sounds stupid because i dont know much about it ,im just linux newbie.
Mark Kica
Viper compiler
http://viper.sourceforge.net/ |
|
Back to top |
|
|
Gotterdammerung l33t
Joined: 11 Feb 2004 Posts: 627 Location: Rio de Janeiro, Brazil
|
Posted: Thu Aug 19, 2004 12:02 am Post subject: |
|
|
If you really want to, the variable you'll have to set in order to specify wich gcc flags to use during kernel compiling is the KERNEL_FLAGS variable. _________________ A mind that is stretched by a new experience can never go back to its old dimensions. - Oliver Wendell Holmes |
|
Back to top |
|
|
djm Arch/Herd Tester
Joined: 12 Apr 2004 Posts: 690 Location: Wadham College, Oxford
|
Posted: Thu Aug 19, 2004 8:34 am Post subject: |
|
|
It's not a stupid question, I've thought about doing it myself in the past, but after using a few different love sources releases, when one of them doesn't get on well with your hardware, you soon realise that your kernel is something you want to be able to rely on, and not have to worry if that might be the problem everytime you encounter a bug
But as I said, there's a thread (presumably in doc, tricks and tips) here about it somewhere, which may be of interest to you _________________ the forums.gentoo.org poster formally known as metal leper |
|
Back to top |
|
|
|