Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!yarrina.connect.com.au!news.uwa.edu.au!classic.iinet.com.au!swing.iinet.net.au!news.uoregon.edu!news.emf.net!overload.lbl.gov!lll-winken.llnl.gov!hookup!news.mathworks.com!tank.news.pipex.net!pipex!sunsite.doc.ic.ac.uk!nntp0.brunel.ac.uk!strath-cs!not-for-mail From: nbc@muir-10.cs.strath.ac.uk (Neil Clark) Newsgroups: comp.unix.bsd.freebsd.misc,gnu.gcc.help,comp.os.linux.misc Subject: Re: gcc optimisations when compiling the kernel Date: 2 Nov 1995 14:48:39 -0000 Organization: Comp. Sci. Dept., Strathclyde University, Glasgow, Scotland. Lines: 21 Message-ID: <47alo7$153@muir-10.cs.strath.ac.uk> References: <478mtj$e2v@plato.ucsalf.ac.uk> NNTP-Posting-Host: muir-10.cs.strath.ac.uk Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:8387 gnu.gcc.help:13746 comp.os.linux.misc:68895 Mark Powell <mark@plato.ucsalf.ac.uk> wrote: >Looked in the handbook and the FAQ and couldn't find anything in there on >which optimisations to use when compiling the kernel. <SNIP!> >Comments welcome. I've tried many variations of the optimization options, but haven't really come to any solid conclusions. What I can say is that -funroll-loops increases the size of the kernel quite significantly, and that doing a simple -O3 doesn't compile. On my NetBSD 68K kernel, I inlined the functions (and kept them to avoid undefined symbols), as well as unrolling loops. As a result, the kernel grew from ~500M to ~750M. It *seems* a bit faster, but it could just be my imagination. Perhaps the same would apply to the FreeBSD kernel? At the moment I've settled for the defaults on the trusting presumption that "they know best." It would be interesting if a battery of kernel tests were put together to give some indication of performance, although we all know about the reliability of benchmarks... Neil