Subject: Re: mutex fault
To: Manuel Bouyer <>
From: Andrew Doran <>
List: tech-kern
Date: 12/08/2007 23:45:24
On Sat, Dec 08, 2007 at 11:29:28PM +0100, Manuel Bouyer wrote:

> On Fri, Dec 07, 2007 at 04:51:55PM +0100, Manuel Bouyer wrote:
> > Hum, I may have a clue. The xenevt (src/sys/arch/xen/xen/xenevt.c) bypass
> > the SPL system. It shouldn't deal directly with the scheduler when
> > ci->ci_ilevel >= IPL_SOFTSERIAL, but call softint_schedule().
> > 
> > The code is sys/arch/xen/xen/xenevt.c. The interrupt handler will call
> > xenevt_event().
> OK, it looks like it's because it can call softint_schedule() even if
> ci_ilevel is >= IPL_HIGH. I'll try to come up with a solution based on
> atomic ops only.

Ah, I forgot to reply - sorry. softint_schedule() is fine from any IPL and
at any point in the kernel. It's meant to be as side effect free as
possible. What could cause it is a wakeup() or cv_broadcast() or similar
from a high IPL. Also if the clock interrupt is happening at the wrong IPL.
I'll have a look and see if I can find anything.