Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Mar 1999 19:19:26 +0100 (MET)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        bf20761@binghamton.edu (zhihuizhang)
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Calculation of load average and CCPU_SHIFT
Message-ID:  <199903201819.TAA02543@labinfo.iet.unipi.it>
In-Reply-To: <Pine.SOL.L3.93.990320150853.18347B-100000@bingsun1> from "zhihuizhang" at Mar 20, 99 03:17:56 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 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.

	cheers
	luigi


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?199903201819.TAA02543>