From owner-freebsd-current Thu Dec 20 12:41:34 2001 Delivered-To: freebsd-current@freebsd.org Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by hub.freebsd.org (Postfix) with ESMTP id 7B29C37B419 for ; Thu, 20 Dec 2001 12:41:29 -0800 (PST) Received: (qmail 22774 invoked from network); 20 Dec 2001 20:41:28 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([64.81.54.73]) (envelope-sender ) by mail6.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 20 Dec 2001 20:41:28 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20011220123602.H8230@iguana.aciri.org> Date: Thu, 20 Dec 2001 12:41:11 -0800 (PST) From: John Baldwin To: Luigi Rizzo Subject: Re: vm_zeropage priority problems. Cc: Peter Wemm , current@FreeBSD.org Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 >> locks >> 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 <>< 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