Mean value
Posted Feb 2, 2006 17:37 UTC (Thu) by
madscientist (subscriber, #16861)
In reply to:
Mean value by man_ls
Parent article:
The search for fast, scalable counters
> And while we are at it, I understand that a semaphore is needed to
> increment each per-CPU value, but to read it? Why not read on the fly all
> per-CPU counters and add them to the global counter when a count is
> required?
Exactly what I was thinking! After all a counter is _inherently_ inaccurate: by the time the kernel reports the value back to whomever was asking there's an excellent chance it's changed. So why would it matter if we don't lock the counter before we read it? It seems like there are a number of options that could be considered, although certainly there are complexities as well.
(
Log in to post comments)