Subject: Re: deadlock with sched_lock in SA code
To: Nathan J. Williams <firstname.lastname@example.org>
From: Chuck Silvers <email@example.com>
Date: 08/29/2005 09:43:26
On Sun, Aug 28, 2005 at 10:35:04PM -0400, Nathan J. Williams wrote:
> YAMAMOTO Takashi <firstname.lastname@example.org> 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.
do you want to continue working on this method, or should we just
fix it the simpler way for now?