On Sun, Nov 08, 1998 at 11:59:40AM +0100, Matthias W�chter wrote:
...
> Running a single 100%-usage-application (i.e. BladeEnc to compress MP3
> files) this application not runs on one of the two processors the whole
> time, but hops between the two processors. This happens between 0.1 and 3
> times per second (i.e., sometimes it changes 3 times per second, sometimes
> it keeps one processor for 10 seconds and longer.) xosview shows this: At
> one time, CPU0 has 100% and CPU1 has 0%, then this changes to see CPU0 at
> 0% and CPU1 at 100%.
>
> Is this intended to be? What are the causes for this? Balanced
> utilitzation? Cache management (the Celerons just have 128 kB of cache
> each?) A bug (don't think so :-)?) Where can I get further information on
> this?
Switching CPU is bad for cache utilization. But the scheduler has some bias that makes
the kernel favour keeping a process on the same cpu. You can try to increase the value
in ...linux/include/asm/smp.h:
#define PROC_CHANGE_PENALTY 20 /* Schedule penalty */
Setting this to eg. 100 should make the process less prone to switching CPU.
Tell us how it works for you. It seemed to work for me. If this works for a lot of
people, one could add some lines in the file to make kernels configured for PPro/PIIs
run with a higher penalty value.
I submitted such a patch to Linus some time ago, but I guess it got lost somewhere...
:)
................................................................
: [EMAIL PROTECTED] : And I see the elder races, :
:.........................: putrid forms of man :
: Jakob �stergaard : See him rise and claim the earth, :
: OZ9ABN : his downfall is at hand. :
:.........................:............{Konkhra}...............: