Re: nice and hyperthreading on atom

From: Peter Zijlstra
Date: Sat Sep 06 2008 - 12:31:42 EST


On Sat, 2008-09-06 at 16:43 +0100, 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.
>
> Google finds patches posted by Con Kolivas a looong time ago to address
> this. Can anyone tell me what has happened in the meantime? Maybe
> this feature is now in the kernel, but there's something I have to do
> to enable it (e.g. choose the right scheduler). Or maybe it never made
> it in, for some reason.

Assuming the hardware makes each 'virtual' cpu get a similar share of
the hardware resources, there is nothing the operating system can do.

The OS just sees two cpus, and its impossible to schedule two tasks of
different weight on two cpus so that execution time is fair and work is
conserved - this is called an infeasible weight distribution.

So unless the Atom has some interface to influence how the resources are
distributed between the execution contexts (for which Linux currently
lacks any and all support) there is nothing we can do.


--
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/