Re: [RFC 2/2] sched/fair: prefer a CPU in the "lowest" idle state

From: Sebastian Andrzej Siewior
Date: Sat Feb 02 2013 - 12:50:24 EST


On 01/31/2013 03:12 AM, Michael Wang wrote:
> I'm not sure, but just concern about this case:
>
> group 0 cpu 0 cpu 1
> least idle 4 task
>
> group 1 cpu 2 cpu 3
> 1 task 1 task
>
> The previous logical will pick group 1 and now it will take group 0, and
> that cause more imbalance, doesn't it?

That depends on load of CPU 0 + 1 vs CPU 2 + 3. If the four tasks on
CPU1 are idle then the previous code should return group 0.
If the four tasks are running at 100% each then two of them should be
migrated to CPU0 and this point the idle state does not matter :)

> May be check that state in find_idlest_cpu() will be better?

You say to move this from find_idlest_group() to find_idlest_cpu()?

> Regards,
> Michael Wang

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