Re: nice and hyperthreading on atom

From: Phil Endecott
Date: Sun Sep 07 2008 - 09:58:27 EST


Phil Endecott wrote:
Dear Experts,

I have an ASUS Eee with an Atom processor, which has hyperthreading enabled. If I have two processes, one nice and the other normal, they each get 50% of the CPU time. Of course this is what you'd expect if the scheduler didn't understand that the two virtual processors are not really independent. I'd like to fix it.

I thought I'd try to quantify the effect with real processes. My "foreground" task is a compilation and my "background" task is a tight loop at nice -9. No doubt you would get different results with different tasks (amount of I/O, cache hit rate, different nice level etc.).

With no background task running, the foreground task takes 86s whether or not HT is enabled. With the background task running, the foreground task takes 97s with HT off and 104s with HT on. 104s is better than I was expecting; in fact it's close enough to 97s that the problem can be overlooked in this case.

I made a number of other measurements, of which the most significant is that the run time with no background task comes down to 63s with -j2 when HT is on. So for this compilation, hyperthreading makes the CPU perform like 1.36 uniprocessors (in some sense). I'll have to try to remember how to make -j2 the default...

Anyway, can I take it that the previous patches to improve this behaviour have never been merged?


Regards, Phil.




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