Date: Tue, 02 May 2000 14:30:14 -0600 From: Steve Passe <smp@timing.com> To: freebsd-smp@FreeBSD.ORG Cc: tlambert@primenet.com ('Terry Lambert'), BHechinger@half.com (Brian Hechinger), dillon@apollo.backplane.com, jgowdy@home.com, smp@timing.com, jim@thehousleys.net Subject: Re: hlt instructions and temperature issues Message-ID: <200005022030.OAA13797@RoadRunner.timing.com>
next in thread | raw e-mail | index | archive | help
Hi, > The benefit to doing this is processor affinity for processes. > > Right now, if a CPU comes into the scheduler, the process at > the top of the run queue gets the CPU. This results in cache > busting. Not exactly true, there is CPU affinity code in kern_switch.c: /* * chooseproc() selects the next process to run. Ideally, cpu_switch() * would have determined that there is a process available before calling * this, but it is not a requirement. The selected process is removed * from it's queue, and the queue busy bit is cleared if it becomes empty. * This must be called at splhigh(). * * For SMP, trivial affinity is implemented by locating the first process * on the queue that has a matching lastcpu id. Since normal priorities * are mapped four priority levels per queue, this may allow the cpu to * choose a slightly lower priority process in order to preserve the cpu * caches. */ struct proc * chooseproc(void) -- Steve Passe | powered by smp@timing.com | Symmetric MultiProcessor FreeBSD To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005022030.OAA13797>