Getting rid of the static msleep priority boost
Jeff Roberson
jroberson at chesapeake.net
Wed Mar 19 09:52:25 UTC 2008
On Wed, 19 Mar 2008, David Xu wrote:
> Daniel Eischen wrote:
>
>> I'm not sure if any of the above remove the priority from the API,
>> but it would be nice to get rid of msleep totally and replace it
>> with an equivalent cv_wait().
>>
>
> And create sleep queue in each cv to get rid of shared sleep queue
> lock ?
Some spinlock is required to interlock with the scheduler lock via
thread_lock(). So I don't think you can get rid of that layer. You also
wouldn't want to have the cost of a 'struct sleepqueue' everywhere you
want a msleep/condvar.
I personally don't see any real advantage to using condvar everywhere.
The only thing you really get is protection against spurious wakeups.
Thanks,
Jeff
>
> Regards,
> David Xu
>
More information about the freebsd-arch
mailing list