7 messages in org.opensolaris.mdb-discuss[mdb-discuss] how to analyse the stac...
FromSent OnAttachments
liujunJul 31, 2007 4:45 am 
Gavin MaltbyJul 31, 2007 5:28 am 
Frank HofmannJul 31, 2007 5:39 am 
liujunJul 31, 2007 9:59 am 
Gavin MaltbyAug 1, 2007 2:15 am 
Oliver YangAug 11, 2007 9:14 pm 
Gavin MaltbyAug 20, 2007 3:26 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[mdb-discuss] how to analyse the stack infoActions...
From:Frank Hofmann (Fran@Sun.COM)
Date:Jul 31, 2007 5:39:12 am
List:org.opensolaris.mdb-discuss

On Tue, 31 Jul 2007, liujun wrote:

[ ... ]

Why the intr_thread stack frames is live in mppLnx_dpc_handler threads stack at
this point.

Because interrupts, even low-level interrupts like the disk interrupt in your case, when first dispatched, will first run on the stack of whatever was active at the point of the interrupt occurring.

Only when/if the interrupt handler passivates, i.e. calls a function that would block, for example mutex_enter() on a held mutex where the owner has gone sleeping, only then will the interrupt passivate and switch to an interrupt stack. This hasn't happened (yet) in the case you've shown. And often enough, it doesn't happen at all - in the end, interrupt handlers are supposed to do their work quickly and effectively, without the need to passivate.

Running the interrupt handler on the stack of whatever kernel thread was active at that point gains performance - no cycles wasted on switching stacks, no TLB miss for the new stackpage. That's also why high-level interrupts never passivate.

What you see is perfectly normal. Well, apart from the assertion failure, but that can't be "blamed" on the behaviour of interrupt dispatch. Rather, if the above behaviour of interrupt dispatch causes this failure of your driver, then your driver has a bug.

FrankH.

Thank your!!

This message posted from opensolaris.org