From: Michael Neuling <mikey@neuling.org>
To: Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@elte.hu>
Cc: miltonm@bga.com, linux-kernel@vger.kernel.org, ego@in.ibm.com
Subject: sched: question on group_capacity when SMT > 2
Date: Wed, 31 Mar 2010 13:42:00 +1100 [thread overview]
Message-ID: <22074.1270003320@neuling.org> (raw)
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
reply other threads:[~2010-03-31 2:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=22074.1270003320@neuling.org \
--to=mikey@neuling.org \
--cc=ego@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miltonm@bga.com \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox