Converting lkcd from a pull to a push model
Keith Owens
kaos at sgi.com
Tue Apr 1 15:24:49 PST 2003
On Tue, 1 Apr 2003 14:27:35 +0530,
"Vamsi Krishna S ." <vamsi at in.ibm.com> wrote:
>Capturing the state in spin loops when a flag say kdb_enter_debugger
>is set seems like a good idea. There doesn't seem to be much point
>in doing it at other places as if a cpu is not in a tight spin loop,
>it would have got the (NMI class) IPI. But, adding test for a flag
>and call to save register state within spinlock's code may
>be considered 'bloat' and unacceptable by many people :-(.
kdb v4.1 does not test a flag in i386 spinlocks because the NMI
"alwasy" gets through on i386, the test is only done on ia64. I have
rewritten the spinlock code on ia64[*] to put only the uncontended path
inline. There is a single copy of the code for the contended path, so
adding a kdb test to that single copy is not an issue.
[*] The current ia64 spinlock code uses 5 bundles for each spinlock()
call. By moving the contended code out of line I got the
spinlock() code down to 3 bundles for McKinley, 4 bundles for
Itanium. The new spinlock code is smaller, it is measurably faster
for uncontended locks and it gives better debugging for contended
locks.
More information about the kdb
mailing list