From owner-freebsd-current Sat Dec 22 2:25:25 2001 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 0012B37B405; Sat, 22 Dec 2001 02:25:21 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id VAA32210; Sat, 22 Dec 2001 21:25:11 +1100 Date: Sat, 22 Dec 2001 21:25:16 +1100 (EST) From: Bruce Evans X-X-Sender: To: Luigi Rizzo Cc: John Baldwin , , Peter Wemm Subject: Re: vm_zeropage priority problems. In-Reply-To: <20011222000639.A22666@iguana.aciri.org> Message-ID: <20011222211250.E7836-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Sat, 22 Dec 2001, Luigi Rizzo wrote: > On Sat, Dec 22, 2001 at 06:48:26PM +1100, Bruce Evans wrote: > > Most of the changes here are to fix style bugs. In the NEW_SCHED case, > > the relative weights for each priority are determined by the niceweights[] > > table. kg->kg_estcpu is limited only by INT_MAX and priorities are > > assigned according to relative values of kg->kg_estcpu (code for this is > > not shown). > > i guess the latter is the hard part... what kind of complexity does > it have ? Not too bad. I use an extra loop in schedcpu() to find the current maximum of all kg->kg_estcpu, and convert the divison by this maximum (for scaling individual kg->kg_estcpu's) to a multiplication and a shift. This can probably be done better in loadav(). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message