Date: Sun, 30 Jul 2006 06:52:20 +1000 From: Peter Jeremy <peterjeremy@optushome.com.au> To: Sten Daniel =?iso-8859-1?Q?S=F8rsdal?= <lists@wm-access.no> Cc: freebsd-current@freebsd.org Subject: Re: vmstat's entries type Message-ID: <20060729205220.GD748@turion.vk2pj.dyndns.org> In-Reply-To: <44CBB179.6070904@wm-access.no> References: <200607251254.k6PCsBef092737@lurza.secnetix.de> <200607271058.13055.jhb@freebsd.org> <20060728121525.GA44917@uk.tiscali.com> <200607280928.36573.jhb@freebsd.org> <20060728134701.GA45273@uk.tiscali.com> <20060728210154.GC748@turion.vk2pj.dyndns.org> <44CBB179.6070904@wm-access.no>
next in thread | previous in thread | raw e-mail | index | archive | help
--pQhZXvAqiZgbeUkD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, 2006-Jul-29 21:05:29 +0200, Sten Daniel Srsdal wrote: >Peter Jeremy wrote: >> In a MP configuration where it doesn't particularly matter if a >> particular update gets counted this time or next time, I think the >> cheapest option is to have per-CPU 32-bit counters (so no locks are >> needed to update the counters) with a polling function to accumulate >> all the individual counters into a 64-bit total. This pushes the cost >> from the update (very frequent) into the read (which is relatively >> infrequent), for a lower overall cost. >Is caching necessary somewhere or can the function return the value >directly without storing the global accumulated counter? If you want a 64-bit final result that takes into account overflows in the 32-bit per-CPU counters, then you will need some way to keep track of the number of overflows in each counter. --=20 Peter Jeremy --pQhZXvAqiZgbeUkD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQFEy8qE/opHv/APuIcRAvm/AJ4mwLBMec9CemgPajL0Tx+KbPB23ACdF2ym EgSFOmTnNKAPSo5ViLKjgpk= =g8X1 -----END PGP SIGNATURE----- --pQhZXvAqiZgbeUkD--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060729205220.GD748>