Re: Interesting scheduling times - NOT

Kurt Garloff (garloff@kg1.ping.de)
Tue, 22 Sep 1998 18:37:22 +0200


On Tue, Sep 22, 1998 at 09:19:08PM +1000, Richard Gooch wrote:
> > Good idea, Larry. So I also spent some time without being bored ...
> > ..
> > I didn't perform timings on the code, but I did make sure, Linux (UP) works
> > properly after applying the patch.
> > Richard, could you perform your tests? You can also send me your test
> > program. As the K6-2 L1 cache is only 2 way associative, IIRC, it should
> > make some difference here, too.
> > Linus, you may want to include it into the kernel, if it helps making
> > sched() a little bit faster?
>
> I've already done this myself (my patch does similar things to yours)
> and timed it on my PPro 180. In a previous message I posted the patch
> too. See:
> http://www.atnf.csiro.au/~rgooch/benchmarks/

I picked Richard's program from the list, modified it to display min, avg
and max w/ %4.1f precision and performed timings on my K6-2 (@ 4 x 75MHz).
I booted to Single user mode in order to have a reproducable environment.
Results are reproducible, AFAICT. I will report min values, but the avg
values are just 1--2\% larger. The max values were consistently about 3 us
larger. (In the threads test w/o procs, sometimes only 1 or 2 us)
All measurements were repeated at least 5 times.

Only oddity is that in the 2.1.122 both case, the times were larger before I
ran the 32proc tests. Afterwards, I couldn't reproduce the somewhat slower
times from before. Seems to be cache effects.

Here's the results: (all on UP kernels)
w/32 procs per proc
proc thread proc thread proc thread
2.1.120 6.5 2.8 28.3 22.0 0.68 0.60
2.1.122 FPU 6.0 3.9 28.1 22.1 0.69 0.57
2.1.122 both 4.7 2.5 16.4 11.2 0.37 0.27

FPU means with Linus' FPU patch and both means w/ his patch and mine.

So making task_struct more cache-friendly seems to be worth the trouble, if
RT scheduling latency is important.

Happy hacking,

-- 
Kurt Garloff, Dortmund 
<K.Garloff@ping.de>
PGP key on http://student.physik.uni-dortmund.de/homepages/garloff
----------------------------------------------------------------------------
The following is a Python RSA implementation. According to the US Government
posting these four lines makes me an international arms trafficker!  Join me
in civil disobedience; add these lines of code to your .sig block to help get
this stupid and unconstitutional law changed.
============================================================================
from sys import*;from string import*;a=argv;[s,p,q]=filter(lambda x:x[:1]!=
'-',a);d='-d'in a;e,n=atol(p,16),atol(q,16);l=(len(q)+1)/2;o,inb=l-d,l-1+d
while s:s=stdin.read(inb);s and map(stdout.write,map(lambda i,b=pow(reduce(
lambda x,y:(x<<8L)+y,map(ord,s)),e,n):chr(b>>8*i&255),range(o-1,-1,-1)))

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/