From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 102b75,4820dfa6cb2bff3e X-Google-Attributes: gid102b75,public X-Google-Thread: 111c93,3626ccca6bb70e55 X-Google-Attributes: gid111c93,public From: Erik Corry Subject: Re: 21264 performance anomalies Date: 1999/04/15 Message-ID: <7f51be$14sja$1@xinwen.daimi.au.dk>#1/1 X-Deja-AN: 466754244 References: <87d81hkqw0.fsf@pfaffben.user.msu.edu> <7eemp3$11ap@news1.newsguy.com> <370BA607.1F391244@moene.indiv.nluug.nl> <7ei0gg$1kg$1@news.tuwien.ac.at> <370CF898.BD85182@moene.indiv.nluug.nl> <7ej80q$o1a$1@news.tuwien.ac.at> <923660402.19654.0.nnrp-12.9e981e55@news.demon.co.uk> <7f2e17$ds2$1@news1.rmi.net> <3714DA77.6150C99A@bell-labs.com> <7f4m3f$mtff$2@xinwen.daimi.au.dk> <3715f75f.0@news.destek.net> X-Complaints-To: news@daimi.au.dk X-Trace: xinwen.daimi.au.dk 924190894 1208938 255.255.255.255 (15 Apr 1999 15:41:34 GMT) Organization: University of Aarhus, Department of Computer Science (DAIMI) User-Agent: tin/pre-1.4-980818 ("Laura") (UNIX) (Linux/2.2.5 (i686)) NNTP-Posting-Date: 15 Apr 1999 15:41:34 GMT Newsgroups: comp.os.linux.alpha,comp.arch In comp.arch Dave Cherkus wrote: > Erik Corry (erik@arbat.com) wrote: >> >> Why 'unfortunately'? Has this feature limited gcc's portability? > It surely makes it hard to compile code written using this construct > with compilers other than gcc. If you care you can make gcc issue warnings/errors for this sort of thing. > I've been told that the only compiler > that can compile the Linux kernel code is gcc/egcs. It'd be nice to > see if the upcoming Compaq Alpha compilers for Linux produce a faster > kernel, but I've been told the work involved in eliminating/recoding > gcc constructs is huge. Does the Compaq compiler allow you to embed gas assembler snippets in your code? That is a very valid thing for a kernel to want to do, and the Linux kernel does it all over the place. Until that is possible, minor things like label variables are not worth thinking about. The Linux kernel (in eg /usr/src/include/asm-i386/uaccess.h) also does some clever stuff, setting up a sort of simple exception handler that handles programs passing bad pointers to system calls with 0 overhead in the common case. Not even the icache is hit with the error handling code, since it is put in a different section. This is one of the reasons Linux does so well in lmbench scores (when's the next version due out, Larry?). So, yes, the Linux kernel uses a lot of gcc extensions, but there are good reasons for it most of the time. -- Erik Corry erik@arbat.com Ceterum censeo, Microsoftem esse delendam!