Module Name:    src
Committed By:   martin
Date:           Thu Nov 30 14:31:04 UTC 2017

Modified Files:
        src/sys/kern [netbsd-8]: subr_localcount.c
        src/sys/sys [netbsd-8]: localcount.h

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #404):
        sys/sys/localcount.h: revision 1.5
        sys/kern/subr_localcount.c: revision 1.7
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@


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/kern/subr_localcount.c
cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/sys/localcount.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Reply via email to