Date: Tue, 18 Mar 2008 23:53:14 -1000 (HST) From: Jeff Roberson <jroberson@chesapeake.net> To: David Xu <davidxu@FreeBSD.org> Cc: Daniel Eischen <deischen@FreeBSD.org>, arch@FreeBSD.org Subject: Re: Getting rid of the static msleep priority boost Message-ID: <20080318235125.G910@desktop> In-Reply-To: <47E0CCC4.8040503@freebsd.org> References: <20080307020626.G920@desktop> <Pine.GSO.4.64.0803071114100.1950@sea.ntplx.net> <47E0CCC4.8040503@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080318235125.G910>