Weird vmstat -s stats
Lowell Gilbert
freebsd-stable-local at be-well.no-ip.com
Sun Jul 6 20:06:43 PDT 2003
Chris Pressey <cpressey at catseye.mb.ca> writes:
> 'Scuse me if I'm out of my depth here, but wouldn't the atomic 64-bit
> update only have to be done when the lower 32 bits were about to wrap
> (which would be relatively infrequent)?
Unfortunately, that doesn't quite work. It opens up a race condition
where the counter wasn't about to wrap when you do the check, but
has been advanced again when you do the increment.
> The check to see if the lower 32 bits were about to wrap would be
> relatively cheap, too, I'd think.
Absolutely. The problem is just that the check itself is not atomic.
More information about the freebsd-stable
mailing list