public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sched: question on group_capacity when SMT > 2
@ 2010-03-31  2:42 Michael Neuling
  0 siblings, 0 replies; only message in thread
From: Michael Neuling @ 2010-03-31  2:42 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar; +Cc: miltonm, linux-kernel, ego

Peter & Ingo,

At the end of update_sg_lb_stats() we have this calculation:

  sgs->group_capacity =
		DIV_ROUND_CLOSEST(group->cpu_power, SCHED_LOAD_SCALE);

At the sibling level when we have SMT2, cpu_power will be 1178/2
(provided we are not scaling power with freq say) and SCHED_LOAD_SCALE
will be 1024, resulting in group_capacity being 1.

If we have SMT4, cpu_power will be 1178/4, hence group_capacity will end
up as 0.  Shouldn't group capacity always be >= 1?  Do we need to round
this up instead or make sure group_capacity is minimum of 1?  Or do we
need to change the way we calculate cpu_power in the SMT > 2 case? 

A similar problem could occur in SMT2 mode if cpu_power was scaled down
to less than 1024.

(FWIW the undocumented sprinkling of DIV_ROUND_blah in kernel/sched* is
somewhat disconcerting)

Regards,
Mikey

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-31  2:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-31  2:42 sched: question on group_capacity when SMT > 2 Michael Neuling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox