From owner-freebsd-hackers Sun Mar 21 9: 6:58 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from bingsun2.cc.binghamton.edu (bingsun2.cc.binghamton.edu [128.226.1.6]) by hub.freebsd.org (Postfix) with ESMTP id F077A14C3B for ; Sun, 21 Mar 1999 09:06:56 -0800 (PST) (envelope-from bf20761@binghamton.edu) Received: from localhost (bf20761@localhost) by bingsun2.cc.binghamton.edu (8.8.7/8.6.9) with SMTP id MAA22264; Sun, 21 Mar 1999 12:06:28 -0500 (EST) Date: Sun, 21 Mar 1999 12:06:28 -0500 (EST) From: zhihuizhang X-Sender: bf20761@bingsun2 To: Luigi Rizzo Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Calculation of load average and CCPU_SHIFT In-Reply-To: <199903201819.TAA02543@labinfo.iet.unipi.it> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 20 Mar 1999, Luigi Rizzo wrote: > > I am looking into the source code in file vm_meter.c and kern_synch.c of > > FreeBSD 2.2.8. They use integer multiplication and shift operation to > > replace the costly float multiplication. The FSCALE and FSHIFT are for > > it is not only costly (actually, on modern CPUs it is not costly at > all!), FPU usage is not allowed in the kernel. > I have never heard of this. Can you explain a little bit more on why FPU usage is not allowed in the kernel or give me pointers where I can find more information on this topic? For the rest of my original question, I guess that it uses "fixed-point arithmetic". Thanks a lot. -Zhihui To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message