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 [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message