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: 09/18/2005 18:45:36
On Sep 18, 2005, at 4:03 PM, Chuck Silvers wrote:

> it turned out that there was a similar problem with freeing a
> struct sadata_upcall, pool_put() can also call wakeup().  to get  
> around
> this, I had sa_switch() free the structure after it sleeps instead  
> of before.
> this means we're hanging onto the structure for the duration of the  
> sleep
> for a lame reason, oh well.

Maybe we could free it to a private free list, and when upcalls are  
allocated, we can just check the free list before calling pool_get 
().  That way we could actually use the straggler.

> I also took the opportunity to clean up the freeing of sau->sau_arg,
> this is now done via a callback.  sa_upcall0() always returns 0, so I
> made it void and removed the code that handled error returns.
>
> anyone have any comments on this before I check it in?
>
> -Chuck
> <diff.sa-deadlock.2>

-- thorpej