On Fri, 18 Dec 1998, Linus Torvalds wrote:

> On Fri, 18 Dec 1998, David S. Miller wrote:
> > 
> > And most of the time on x86 it happens because idlers on SMP there
> > just slam into the scheduler() over and over even when zero useful
> > work is available.
> 
> The idle loop calls "hlt", which waits for an interrupt.

it can be significant if we have many interrupts which generate only a few
reschedules, or cause reschedules for other CPUs (==good balancing). Even
if other CPUs do not need the scheduler or task or runqueue lock, we
possibly end up generating unnecessary bus traffic. 

[another slightly crazy and unrelated idea that just popped up: we could
prime the I-cache _before_ going 'hlt'. schedule has two 'halves'
I-cache-wise: the part until switch_to, and the part after it. If we get
out of schedule(), we will likely enter it again, so we could just
proactively load the first half of schedule() into the I-cache. (some
prefetching instructions would be nice here). The only case where this
thing fails: heavy IRQ load without reschedules, which flushes so much
that it flushes out this primed I-cache content too. This is very
unlikely, we just primed it into an LRU-scheme ...]

-- mingo

-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]

Reply via email to