From owner-freebsd-arch@FreeBSD.ORG Sun May 6 10:10:27 2007 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 82DE316A408 for ; Sun, 6 May 2007 10:10:27 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-3-125.belrs4.nsw.optusnet.com.au [220.239.3.125]) by mx1.freebsd.org (Postfix) with ESMTP id F3DC413C4CC for ; Sun, 6 May 2007 10:10:26 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.14.1/8.14.1) with ESMTP id l46AAKiJ004979; Sun, 6 May 2007 20:10:20 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.14.1/8.14.1/Submit) id l46AAK9r004978; Sun, 6 May 2007 20:10:20 +1000 (EST) (envelope-from peter) Date: Sun, 6 May 2007 20:10:20 +1000 From: Peter Jeremy To: Diomidis Spinellis Message-ID: <20070506101020.GL825@turion.vk2pj.dyndns.org> References: <19235.1178303887@critter.freebsd.dk> <463BB88F.4020804@aueb.gr> <463D9A7A.1080800@aueb.gr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uCPdOCrL+PnN2Vxy" Content-Disposition: inline In-Reply-To: <463D9A7A.1080800@aueb.gr> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.14 (2007-02-12) Cc: arch@freebsd.org, Garance A Drosehn Subject: Re: Accounting changes X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2007 10:10:27 -0000 --uCPdOCrL+PnN2Vxy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2007-May-06 12:06:02 +0300, Diomidis Spinellis wrote: >Garance A Drosehn wrote: >>Does this mean the new accounting record will be using the >>native-hardware format for floating point numbers? Does that mean >>the records produced will be different for different hardware? > >My intention is to use the standard (IEEE 754-1985 / IEEE 854-1987 / IEC= =20 >60559) 32-bit float format. This is the C "float" type on all the=20 >architectures we support. I could add a typedef clarifying this, but I=20 >doubt we'll ever support an architecture (VAX?) where float is a=20 >different format. IEEE-754 etc define how to interpret a 32-bit object as a floating point number. AFAIK, it does not define how that object is laid out in memory so that a float written on SPARC (big-endian) will be different to that written on an i386 (little-endian). Accounting records do not need all the features that a general FP format needs: - No need to support negative numbers - It is easy to define comp_t so there are no negative exponents - No need to support denormals - No need to support NaN - Supporting infinity is optional. This means that it's possible to define a format that is relatively easy to manipulate or convert into a "standard" C FP format. >>I also wonder about using a time_t for ac_btime (starting time). >>Now that we're running freebsd on very fast, multi-processor systems, >>we might care whether "-command" executed before "-command", >>and we might wish to have better resolution for the start-time of a >>given command. On a multi-processor machine, both commands may have begun at the same time (measured to whatever precision you want). There are occasional discussions regarding file timestamps (lack of precision can confuse make) - which is a related issue. The decision as to whether make ac_time a time_t or (eg) struct timespec is not obvious: There is a definite space disadvantage to increasing ac_time precision (though there's only one instance per accounting record so the problem isn't as serious as comp_t). OTOH, I can see theoretical reasons for wanting to know which command came first. This is probably a question that needs wider discussion: Has there been any request for greater precision within the FreeBSD user community? --=20 Peter Jeremy --uCPdOCrL+PnN2Vxy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGPamM/opHv/APuIcRAstHAJwJcziVPZDVoeZgM58mZ11vq2vdfQCfeKPf Q/IU5yS+ZerhrBy5jQCW0lg= =yegx -----END PGP SIGNATURE----- --uCPdOCrL+PnN2Vxy--