Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.mel.connect.com.au!news.syd.connect.com.au!news.bri.connect.com.au!corolla.OntheNet.com.au!news From: Tony Griffiths <tonyg@OntheNet.com.au> Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: gcc optimizations for kernel Date: Sat, 14 Sep 1996 18:13:50 +1000 Organization: On the Net (ISP on the Gold Coast, Australia) Lines: 26 Message-ID: <323A693E.7B4C@OntheNet.com.au> References: <51d0eg$9uf@usenet4.interramp.com> Reply-To: tonyg@OntheNet.com.au NNTP-Posting-Host: swanee.nt.com.au Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (WinNT; I) To: dcmyers@access.digex.net dcmyers@access.digex.net wrote: > > Following up on a comment made in the "Benchmarking different UNIX systems" > thread, I'd like to know what the best gcc optimizations are for a FreeBSD > kernel running on a Pentium. For example, I noticed that the default > Makefile uses plain ol' -O, as opposed to -O2 or -O3. Is it safe to > turn on the higher optimization levels? And what sort of performance > increase has been measured? I'd happily trade a few tens of kilobytes > of kernel size for better performance... > > Any suggestions welcome. Thanks. > > -David. The higher levels of optimisation are "probably" OK for non-device driver code, but would almost certainly bring you undone in a driver. Re-arranging the order of 'bashing' device registers is generally not a good thing. In my days at DEC Networks Engineering when I was building Ultrix/OSF kernel modules, the make file had two sets of CCFLAGS, one for device driver modules and another for non-driver modules. If you feel brave enough to go through and modify the make file, then you might get a "-O3" kernel to work but it will be a LOT of work!!! Tony