Date: Thu, 3 Oct 1996 15:15:59 +0100 (BST) From: Doug Rabson <dfr@render.com> To: Peter Wemm <peter@spinner.dialix.com> Cc: Chris Csanady <ccsanady@friley216.res.iastate.edu>, freebsd-smp@freebsd.org Subject: Re: Scheduling and idle loops.. (Was Re: cvs commit: sys/kern . . ) Message-ID: <Pine.BSF.3.95.961003151131.10204S-100000@minnow.render.com> In-Reply-To: <199610031239.UAA05805@spinner.DIALix.COM>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 3 Oct 1996, Peter Wemm wrote: > > At present, we have 32 run queues with 4 (8?) priority levels in each > queue. When the scheduler runs, it picks the first process off the top of > the highest priority queue. > > Something has to be done here since there seems to be no real way to bias > processes to attempt to give them preference for a single cpu to get some > advantage of the on-cpu cache. Otherwise, the processes seem to bounce > backwards and forwards from one cpu to the other and so on. > > I don't know an easy answer offhand.. > > If we maintain this strategy, perhaps we'd need to have one set of 32 run > queues for each cpu as well as the common one. The scheduler could look > in the per-cpu queue first and if there's a process available that's "near > enough" to the head of the "real" run queue then choose that. That starts > to get messy though, perhaps a simple list of "recently run processes" to > look in the run queues for may be enough. > > > I dont know.. perhaps I should just stay away from some stuff. :) > > Well, if anybody comes up with a better strategy that fits the kernel > without too much trauma (that's also understandable), it's worth hearing. Why not use a byte in struct proc for the cpuid of the processor which most recently ran the process. If there is a choice of highest-priority processes, each cpu could choose a process which it has run before, otherwise just pick the highest priority process as normal. -- Doug Rabson, Microsoft RenderMorphics Ltd. Mail: dfr@render.com Phone: +44 171 734 3761 FAX: +44 171 734 6426
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.961003151131.10204S-100000>