Re: [patch v4 01/18] sched: set SD_PREFER_SIBLING on MC domain toreduce a domain level

From: Alex Shi
Date: Wed Feb 13 2013 - 08:22:40 EST


On 02/12/2013 06:11 PM, Peter Zijlstra wrote:
> On Thu, 2013-01-24 at 11:06 +0800, Alex Shi wrote:
>> The domain flag SD_PREFER_SIBLING was set both on MC and CPU domain at
>> frist commit b5d978e0c7e79a, and was removed uncarefully when clear up
>> obsolete power scheduler. Then commit 6956dc568 recover the flag on CPU
>> domain only. It works, but it introduces a extra domain level since this
>> cause MC/CPU different.
>>
>> So, recover the the flag in MC domain too to remove a domain level in
>> x86 platform.

Peter, I am very very happy to see you again! :)
>
> This fails to clearly state why its desirable.. I'm guessing its because
> we should use sibling cache domains before sibling threads, right?

No, the flags set on MC/CPU domain, but is checked in their parents
balancing, like in NUMA domain.
Without the flag, will cause NUMA domain imbalance. like on my 2 sockets
NHM EP: 3 of 4 tasks were assigned on socket 0(lcpu, 10, 12, 14)

In this case, update_sd_pick_busiest() need a reduced group_capacity to
return true:
if (sgs->sum_nr_running > sgs->group_capacity)
return true;
then numa domain balancing get chance to start.

---------
05:00:28 AM CPU %usr %nice %idle
05:00:29 AM all 25.00 0.00 74.94
05:00:29 AM 0 0.00 0.00 99.00
05:00:29 AM 1 0.00 0.00 100.00
05:00:29 AM 2 0.00 0.00 100.00
05:00:29 AM 3 0.00 0.00 100.00
05:00:29 AM 4 0.00 0.00 100.00
05:00:29 AM 5 0.00 0.00 100.00
05:00:29 AM 6 0.00 0.00 100.00
05:00:29 AM 7 0.00 0.00 100.00
05:00:29 AM 8 0.00 0.00 100.00
05:00:29 AM 9 0.00 0.00 100.00
05:00:29 AM 10 100.00 0.00 0.00
05:00:29 AM 11 0.00 0.00 100.00
05:00:29 AM 12 100.00 0.00 0.00
05:00:29 AM 13 0.00 0.00 100.00
05:00:29 AM 14 100.00 0.00 0.00
05:00:29 AM 15 100.00 0.00 0.00



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