On 20-Dec-01 Luigi Rizzo wrote:
> On Thu, Dec 20, 2001 at 12:16:03PM -0800, John Baldwin wrote:
>> Priority propagation will already handle things ok. We drop to pri_native
>> after we drop a lock (although if we still hold a contested lock we bump our
>> priority to the min(nativepri, highest priority of threads on contested
>> we hold and drop to nativepri after dropping the last contested lock).
> ok, thanks for the clarification
>> However, kthreads should tsleep() with their current priority, not PPAUSE.
> "current" meaning pri_level or pri_native ? What if one tries to
> tsleep() while holding a lock and so its pri_level is raised ?
pri_level. Calling tsleep() while holding a lock is a bug though. :) Unless
you are calling msleep() with a lock that will be released.
> In the device polling code i did a tsleep on the "original" pri_level,
> but maybe pri_native is good enough.
pri_level is more correct.
John Baldwin <[EMAIL PROTECTED]> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message