Date: Sat, 29 Jul 2006 22:15:31 +0100 From: Brian Candler <B.Candler@pobox.com> To: Peter Jeremy <peterjeremy@optushome.com.au> Cc: Michal Mertl <mime@traveller.cz>, freebsd-current@freebsd.org Subject: Re: vmstat's entries type Message-ID: <20060729211530.GA50342@uk.tiscali.com> In-Reply-To: <20060729205655.GE748@turion.vk2pj.dyndns.org> 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> <1154189612.1565.10.camel@genius.i.cz> <20060729205655.GE748@turion.vk2pj.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jul 30, 2006 at 06:56:55AM +1000, Peter Jeremy wrote: > On Sat, 2006-Jul-29 18:13:32 +0200, Michal Mertl wrote: > >#define PCPU_LAZY_INC(var) (++*PCPU_PTR(var)) > > I missed that. > > >and function vcnt from sys/vm/vm_meter.c > > vcnt() accumulates multiple 32-bit counters into a 32-bit result. Getting > a 64-bit result means additionally tracking overflows in each counter. But if you have per-CPU counters, there's no problem with accumulating 64-bit values in the first place. So in the above macro I don't see why 'var' can't be a pointer to a uint64_t, with relevant minor changes to vcnt() of course. Regards, Brian.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060729211530.GA50342>