Subject: Re: deadlock with sched_lock in SA code
To: YAMAMOTO Takashi <>
From: Nathan J. Williams <>
List: tech-kern
Date: 08/28/2005 22:35:04
YAMAMOTO Takashi <> writes:

> > allocating pages from UVM can call wakeup(), so we must avoid that
> > while holding sched_lock.  one way to do this would be to call
> > sadata_upcall_alloc() before acquiring sched_lock and passing the
> > resulting pointer to sa_switch(), instead of calling that in
> > sa_switch() itself.  does anyone have any better suggestions?
> > if not, I'll fix it that way.
> > 
> > -Chuck
> i thought there were an effort to allocate upcall data on new lwp's stack.

There was. I still have patches for that in one of my development
trees. It kind of stalled out when I reached sparc/sparc64 and tried
to wrap my head around how those stacks are handled.

        - Nathan