From owner-freebsd-current@FreeBSD.ORG Wed Jun 23 15:03:44 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 85C3F16A4CE for ; Wed, 23 Jun 2004 15:03:44 +0000 (GMT) Received: from mail2.speakeasy.net (mail2.speakeasy.net [216.254.0.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1CA4343D49 for ; Wed, 23 Jun 2004 15:03:44 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 25804 invoked from network); 23 Jun 2004 15:03:43 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 23 Jun 2004 15:03:43 -0000 Received: from 10.50.41.233 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i5NF3dMh064436; Wed, 23 Jun 2004 11:03:40 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Julian Elischer Date: Wed, 23 Jun 2004 11:04:42 -0400 User-Agent: KMail/1.6 References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200406231104.42455.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: freebsd-current@FreeBSD.org cc: Bosko Milekic Subject: Re: ithread priority question... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jun 2004 15:03:44 -0000 On Tuesday 22 June 2004 08:07 pm, Julian Elischer wrote: > hmmmm so, how do we give them a priority that is not in the same range a > user processes, and separate from each other when the scheduler > may not use run queues as seen in sched_4bsd.? > > using the magic number RQ_PPQ is not "kosher". > with a different scheduler that may not exist. > > On Tue, 22 Jun 2004, Bosko Milekic wrote: > > Julian Elischer wrote: > > >On Tue, 22 Jun 2004, John Baldwin wrote: > > > > ... > > > > >> That was the intention. One question though, if the ithreads aren't > > >> on the system run queues then which run queues are they on? > > > > > >aren't they run from the interupt? > > > > Not always. They have to be put on a runqueue if they block on a > > mutex, say. > > > > -Bosko In theory the thread priorities are scheduler independent. At least the values with respect to each other. I think I like Bruce's idea as far as removing knowledge of RQ_PPQ from non-scheduler code. The schedulers can easily check for realtime kernel threads (currently just ithreads) and map that to an appropriate priority on its backing queues and allow us to compress the ithread priority space, maybe down to 16 or 32 priorities. /* * Priorities range from 0 to 255, but differences of less then 4 (RQ_PPQ) * are insignificant. Ranges are as follows: * * Interrupt threads: 0 - 63 * Top half kernel threads: 64 - 127 * Realtime user threads: 128 - 159 * Time sharing user threads: 160 - 223 * Idle user threads: 224 - 255 * * XXX If/When the specific interrupt thread and top half thread ranges * disappear, a larger range can be used for user processes. */ -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org