Re: nice and hyperthreading on atom

From: Phil Endecott
Date: Sat Sep 06 2008 - 14:24:51 EST


Arjan van de Ven writes:
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.

but you cannot imfluence the cpu's scheduling of the instructions.

As an OS one COULD decide to just not schedule the nice task at all,
but then, especially on atom where HT has a high efficiency, your cpu
is mostly idle ...

Here's how I imagine it: say I have one regular task and one "nice -9" task. On a conventional uniprocessor system they would get about 90% and 10% of the CPU respectively. On the hyperthreadng system they currently get equal shares; except that the CPU is more efficient with two threads running, so you could perhaps say that they get 60% each or something like that. But 60% is still less than 90%, and I don't want my foreground interactive task being slowed down that much by this niced task. So I envisage the system spending 20% of its time running both tasks and the remaining 80% of the time running just the higher-priority task. That way, I get half of 20% = 10% spent on the nice task and half of 20% plus 80% = 90% spent on the foreground task. (Or maybe something like 12% + 92%, allowing for the hyperthreading efficiency.)

Here's a link to Con Kolivas' post where he described something like this back in 2004:

http://thread.gmane.org/gmane.linux.kernel/178090/focus=178882


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/