If I run the command
time perl -e 'use threads; $T=12 ; foreach (1..$T) { $thr[$i++] = threads->create(sub { printf "I am thread %s\n", threads->tid(); foreach (1..9e6) { push(@a, sqrt(1234)/sin(1234)*cos(1234)) } ; printf "thread %s finished.\n", threads->tid(); }); } foreach (0..$T-1) { $thr[$_]->join(); }'
I see 2.6.37 being 80% slower than 2.6.34. The command just starts 12 threads calculating sqrt(1234)/sin(1234)*cos(1234) 9.000.000 times and waits for all threads to finish.
I ran these tests on a dual Xeon X5650 @ 2.67GHz (6 cores with HT) with 24 GB memory, openSUSE 11.3, kernels 2.6.34.7-0.5-default and kernel-default-2.6.37-6.1 from http://download.opensuse.org/repositories/Kernel:/stable/openSUSE_11.3/x86_64/ .
Is this slowdown expected? Can anyone confirm these results and test the previous command on 2.6.34 and 2.6.37 on your own hardware? If you run the above command, adjust $T to your number of cores. If you run out of memory, decrease the inner loop (1..9e6) to (1..9e5) or similar.
Thanks, Richard