kdb
[Top] [All Lists]

Re: Converting lkcd from a pull to a push model

To: vamsi@xxxxxxxxxx
Subject: Re: Converting lkcd from a pull to a push model
From: Keith Owens <kaos@xxxxxxx>
Date: Wed, 02 Apr 2003 09:24:49 +1000
Cc: S Vamsikrishna <vamsi_krishna@xxxxxxxxxx>, lkcd-general@xxxxxxxxxxxxxxxxxxxxx, kdb@xxxxxxxxxxx
In-reply-to: Your message of "Tue, 01 Apr 2003 14:27:35 +0530." <20030401142735.A23606@in.ibm.com>
Sender: kdb-bounce@xxxxxxxxxxx
On Tue, 1 Apr 2003 14:27:35 +0530, 
"Vamsi Krishna S ." <vamsi@xxxxxxxxxx> 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.


<Prev in Thread] Current Thread [Next in Thread>