vmstat's entries type
Paul Allen
nospam at ugcs.caltech.edu
Sat Jul 29 23:02:15 UTC 2006
Surely all you need to do is a cheap crit_enter,crit_exit
while updating the 64-bit per cpu counters. and on
a 64-bit arch you skip the crit_enter,crit_exit.
Seriously this is a bike shed. We can summarize it thus:
statistics should be maintained in 64-bit counters, these
counters should be per-cpu and consistent in that context,
nothing else should appear on the critical path.
**end of story**
Paul
p.s., and as a general of thumb, if a per-cpu solution
doesn't explode in complexity/memory usage it should be
preferred over a mutex by default.
More information about the freebsd-current
mailing list