Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Apr 1998 08:47:46 -0700
From:      Nate Williams <nate@mt.sri.com>
To:        Mikael Karpberg <karpen@ocean.campus.luth.se>
Cc:        marquard@zilker.net (Dave Marquardt), freebsd-hackers@FreeBSD.ORG
Subject:   Re: bcopy implementation
Message-ID:  <199804031547.IAA22090@mt.sri.com>
In-Reply-To: <199804031420.QAA05837@ocean.campus.luth.se>
References:  <857m57c8tr.fsf@localhost.zilker.net> <199804031420.QAA05837@ocean.campus.luth.se>

next in thread | previous in thread | raw e-mail | index | archive | help
[ Pentium optimized bcopy in libc ]
> > > of not implementing this method in libc? 
> > 
> > Well, you said it yourself.  "On the assumption, that the system has
> > pentium processor...."  Well, we can't assume that, since FreeBSD runs
> > on 386s and up.
> 
> Well, if you want everything to go faster, you optimize for the hardware
> you're actually gonna run on.

People seem to be forgetting that since bcopy isn't a system call, it's
possible to royally screw yourself up with it, since it uses the FP
registers.

So, one program could be in the middle of doing a bcopy, and a second
program could interrupt it, and spam the registers of the previous
program, so that when the first was resume it's results are totally
bogus.

(The kernel doesn't save the contents of the FP registers, but since all
kernel calls are guaranteed to 'complete' before getting swapped, then
this isn't a problem in kernel-land.)


Nate

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804031547.IAA22090>