Messages in this thread | | | Date | Wed, 11 Jan 2012 12:37:44 -0500 | From | Youquan Song <> | Subject | Re: [PATCH] x86,sched: Fix sched_smt_power_savings totally broken |
| |
> I had tested sched_mc_powersavings=2 on dual socket quad core HT > nehalem. It worked as expected. Let me check the > sched_mc_powersavings=1 case. I will not be surprised if it is > broken. >
In my opinion. When CPU cores > 8, sched_mc will have issue of course. What's more, when CPU cores increase it will be abviously if following current CPU power capability calcaluation logic.
If CPU has 8 cores and if HT enabled, its power capability > 9 cores. Current logic, HT enable core power capability = 1178, 1178 * 8 / 1024 > 9.2. So scheduler will try to schedule >8 threads to meet its power capability before use other socket if sched_mc used.
So it will be better, like this: Of course, It is only sample code and I do not try it yet.
For MC: + if (sched_mc_power_savings) + sgs->group_capacity = group->group_weight/2;
For SMT: + if (sched_smt_power_savings && !(sd->flags & SD_SHARE_CPUPOWER)) + sgs->group_capacity = group->group_weight;
Thanks -Youquan
| |