diff options
| author | ozaki-r <ozaki-r@NetBSD.org> | 2017-11-17 09:26:36 +0000 |
|---|---|---|
| committer | ozaki-r <ozaki-r@NetBSD.org> | 2017-11-17 09:26:36 +0000 |
| commit | f437f586481fa3e231276d96497cd5e3769a3eb8 (patch) | |
| tree | 2bc550c529f35faf6d04e59f05daca79eeaf125f /sys/dev | |
| parent | 77697da91311f966bb4b17eb8443512e9df5844f (diff) | |
Implement a debugging facility (overflow/underflow detection) for localcount
We cannot get an accurate count from a localcount instance because it consists
of per-cpu counters and we have no way to sum them up atomically. So we cannot
detect counter overflow/underflow as we can do on a normal refcount.
The facility adds an atomic counter to each localcount instance to enable the
validations. The counter ups and downs in synchronization with the per-CPU
counters. The counter is used iff both DEBUG and LOCKDEBUG are enabled in the
kernel.
Discussed on tech-kern@
Diffstat (limited to 'sys/dev')
0 files changed, 0 insertions, 0 deletions
