Subject: Re: deadlock with sched_lock in SA code
To: Chuck Silvers <chuq@chuq.com>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 08/28/2005 12:20:11
On Aug 28, 2005, at 8:17 AM, Chuck Silvers wrote:

> 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.

That sounds reasonable.

It would be nice to put some assertions in place to prevent this from  
happening again.

-- thorpej