Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Dec 2001 12:16:03 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Luigi Rizzo <rizzo@aciri.org>
Cc:        current@freebsd.org, Peter Wemm <peter@wemm.org>
Subject:   Re: vm_zeropage priority problems.
Message-ID:  <XFMail.011220121603.jhb@FreeBSD.org>
In-Reply-To: <20011220112415.B8230@iguana.aciri.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 20-Dec-01 Luigi Rizzo wrote:
> On Thu, Dec 20, 2001 at 11:13:27AM -0800, Peter Wemm wrote:
> ...
>> Excellent catch!  This particular problem was one of the main reasons
>> why this is still defaulting to 'off'.  I have a couple of other changes
>> to it pending commit to fix some of Bruce's complaints, but I hadn't
>> noticed the cause of this.
>> 
>> Part of the problem is that tsleep temporarily elevates the priority for
>> wakeup, and it is normally returned back to "normal" level when the process
>> returns to userland (see the *_userpri stuff).
> 
> ah, ok, kernel threads never return to userland...
> 
> so, i presume one should also make sure that after the process is
> scheduled, the priority is restored to the 'native' level; this
> should also solve the problem with the priority propagation mechanism
> (though... I have the feeling that if you have nested locks, this
> cannot scale...)

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 locks
we hold and drop to nativepri after dropping the last contested lock). 
However, kthreads should tsleep() with their current priority, not PPAUSE.

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.011220121603.jhb>