lkml.org 
[lkml]   [2012]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86,sched: Fix sched_smt_power_savings totally broken
From
Date
On Mon, 2012-01-09 at 19:14 -0500, Youquan Song wrote:
> Fine, I will base your suggestion to develop another patch soon.
>

>
> @@ -3923,6 +3923,10 @@ static inline void update_sg_lb_stats(struct
> sched_domain *sd,
> SCHED_POWER_SCALE);
> if (!sgs->group_capacity)
> sgs->group_capacity = fix_small_capacity(sd, group);
> +
> + if (sched_smt_power_savings)
> + sgs->group_capacity *= 2;

Note, this has the hard-coded assumption you only have 2 threads per
core, which while true for intel, isn't true in general. I think you
meant to write *= group->group_weight or somesuch.

Also, you forgot to limit this to the SD_SHARE_CPUPOWER domain, you're
now doubling the capacity for all domains.

Furthermore, have a look at the SD_PREFER_SIBLING logic and make sure
you're not fighting that.


\
 
 \ /
  Last update: 2012-01-09 12:09    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site