vmstat's entries type

sthaug at nethelp.no sthaug at nethelp.no
Sun Jul 23 18:58:05 UTC 2006


> > One approach that we could use for 64-bit counters would be to just
> > use 32-bits one, and poll them for overflow and bump an overflow
> > count.  This assumes that the 32-bit counters overflow much less often
> > than the polling interval, and easily triples the amount of storage
> > for each of them...  It is ugly :-(
> > 
> 
> What's wrong with the add+adc (asm) approach found on any i386?

Presumably the fact that add + adc isn't an atomic operation. So if
you want to guarantee 64 bit consistency, you need locking or similar.

Steinar Haug, Nethelp consulting, sthaug at nethelp.no


More information about the freebsd-current mailing list