From owner-freebsd-current@FreeBSD.ORG Mon Jun 21 02:51:41 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 28EED16A4CE for ; Mon, 21 Jun 2004 02:51:41 +0000 (GMT) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id A46F343D45 for ; Mon, 21 Jun 2004 02:51:40 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87])i5L2pR5v030275; Mon, 21 Jun 2004 12:51:27 +1000 Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) i5L2pPnl020536; Mon, 21 Jun 2004 12:51:26 +1000 Date: Mon, 21 Jun 2004 12:51:25 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Julian Elischer In-Reply-To: Message-ID: <20040621123607.C8440@gamplex.bde.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: FreeBSD current users 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: Mon, 21 Jun 2004 02:51:41 -0000 On Sun, 20 Jun 2004, Julian Elischer wrote: > In swi_add, the priority is multiplied by PPQ. > This is a layering violation really because PPQ should only be known > within the scheduler.... but..... "Why multiply by PPQ inthe first > place?" we are not using the system run queues for interrupt threads. > > (PPQ = Priorities Per Queue). > > Without this you can remove runq.h from proc.h and include it only in > the scheduler related files. I agree that this makes no sense. Apart from the layering violation, It seems to just waste priority space. The wastage is not just cosmetic since someone increased the number of SWIs although there was no room for expansion. Hardware ithread priorities are also separated by 4. The magic number 4 is encoded in their definitions in priority.h. It's not clear if the 4 is PPQ or just room for expansion without changing the ABI. Preserving this ABI doesn't seem very important. Bruce