Date: Wed, 24 May 2000 19:29:49 -0700 From: Julian Elischer <julian@elischer.org> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: Chuck Paterson <cp@bsdi.com>, Terry Lambert <tlambert@primenet.com>, arch@FreeBSD.ORG Subject: Re: Preemptive kernel on older X86 hardware Message-ID: <392C901D.31DFF4F5@elischer.org> References: <200005250205.UAA16126@berserker.bsdi.com> <200005250208.TAA78220@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Dillon wrote: > > We've had very good luck encapsulating our MP lock code in real > honest-to-god subroutines rather then trying to make them inline > macros. > > On intel anyway, subroutine calls are *cheap*, especially compared > to the overhead of a locked instruction or even an L1 cache miss. > > It's a no-brainer. One paper I read recently (can't remember which) used the method of making all locks calls to very generic (slow) code to start with, and as each lock is run, it replaces the calling code with a call to the appropriate 'quick' call, depending on teh cpu type and whether there si more than one of them. In the UP case, it replaces them with very simple locks or NOPS depending on the type of lock etc. The kernel speeds up as it gradually replaces all the locks. (In fact not so gradual, as >90% of them were replace by the end of booting). Doesn't work for romable code, though you could even do that if you used a redirection table :-) > > -Matt > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000 ---> X_.---._/ presently in: Perth v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?392C901D.31DFF4F5>