Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel Flags
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
xprometeus
n00b
n00b


Joined: 19 Jan 2004
Posts: 50

PostPosted: Sun Aug 15, 2004 2:51 pm    Post subject: Kernel Flags Reply with quote

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


Joined: 07 Feb 2003
Posts: 2139
Location: Graz, Austria (Europe - no kangaroos.)

PostPosted: Mon Aug 16, 2004 1:29 pm    Post subject: Re: Kernel Flags Reply with quote

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
View user's profile Send private message
djm
Arch/Herd Tester
Arch/Herd Tester


Joined: 12 Apr 2004
Posts: 690
Location: Wadham College, Oxford

PostPosted: Mon Aug 16, 2004 4:10 pm    Post subject: Reply with quote

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


Joined: 11 Feb 2004
Posts: 627
Location: Rio de Janeiro, Brazil

PostPosted: Tue Aug 17, 2004 2:51 am    Post subject: Reply with quote

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


Joined: 19 Jan 2004
Posts: 50

PostPosted: Wed Aug 18, 2004 9:34 pm    Post subject: i know ... Reply with quote

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


Joined: 11 Feb 2004
Posts: 627
Location: Rio de Janeiro, Brazil

PostPosted: Thu Aug 19, 2004 12:02 am    Post subject: Reply with quote

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
View user's profile Send private message
djm
Arch/Herd Tester
Arch/Herd Tester


Joined: 12 Apr 2004
Posts: 690
Location: Wadham College, Oxford

PostPosted: Thu Aug 19, 2004 8:34 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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