SMP, HZ, Scheduling

linux kernel account (linker@nightshade.ml.org)
Mon, 7 Jul 1997 09:34:36 -0400 (EDT)


okay.. A though.. The reason we switch tasks so often is to give processes
a chance to respond to events rapidly.. And to give users the illusion
that multiple programs are actually running 'at once'..

What about on a 2-way SMP computer, would it not make sence to schdule
half as often? After all, there is twice the amount of 'cpu' resource
avaiable.. So if the schduling is done half as often programs will still
get a cpu as often..

I've got an SMP machine (2.1.43/2-166/tyanIIId).. I looked all through the
kernel for the 'right' place to ajust schduling frequency.. But all I
could find was HZ which appears to control the timer interupt.. So I
redefined HZ=50.. Now, I thought this would not work.. Or at best the
clock would get messed and drivers would die.... But, aparently it works..
It's got an uptime of three days now.. (And I think it was three also b4 I
had to move it).. Is there a better way of accomplishing this? Will this
break anything?

I havnt had a chance to find up if this is actually helping anything..
I've just been concerned with stability so far.... Doing a cat
/proc/interupts; sleep 10 ; cat /proc/interupts tells me that my
modification did infact slow down task switching.. Anyone have any
sugestions on how I can test it out?

Is this an okay idea, or is it broken?