From: "Alex,Shi" <alex.shi@intel.com>
To: Nikhil Rao <ncrao@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
"mingo@elte.hu" <mingo@elte.hu>,
"Chen, Tim C" <tim.c.chen@intel.com>,
"Li, Shaohua" <shaohua.li@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Brown, Len" <len.brown@intel.com>
Subject: Re: power increase issue on light load
Date: Thu, 30 Jun 2011 16:34:21 +0800 [thread overview]
Message-ID: <1309422861.14604.472.camel@debian> (raw)
In-Reply-To: <CAOM-RdMkEKvrh9Vo15WgkfZiFLsMzdss+6XAn2w4Z-oXbt+pkA@mail.gmail.com>
On Thu, 2011-06-30 at 08:07 +0800, Nikhil Rao wrote:
> On Tue, Jun 28, 2011 at 7:30 PM, Nikhil Rao <ncrao@google.com> wrote:
> > Looking at the schedstat data Alex posted:
> > - Distribution of load balances across cores looks about the same.
> > - Load balancer does more idle balances on 3.0-rc4 as compared to
> > 2.6.39 on SMT and NUMA domains. Busy and newidle balances are a mixed
> > bag.
> > - I see far fewer affine wakeups on 3.0-rc4 as compared to 2.6.39.
> > About half as many affine wakeups on SMT and about a quarter as many
> > on NUMA.
> >
> > I'm investigating the impact of the load resolution patchset on
> > effective load and wake affine calculations. This seems to be the most
> > obvious difference from the schedstat data.
> >
>
> I went through the math in effective load and wake affine and I think
> it should be OK. There are a couple of corner cases where increasing
> sched load resolution can change the result of wake affine -- I've
> listed them below. However, I not convinced you are hitting these
> cases often enough to make a noticeable difference. I'm looking into
> the other LB paths...
>
> - One corner case is because of rounding error in the shares update
> path. Let's say the shares update logic assigned weight A to a sched
> entity in the case with scaled resolution, and it assigned weight B
> without scaling weights. Now, we expect A/1024 = B, but this is not
> always the case because of rounding error. The difference between (A
> and B*1024) gets amplified in wake_affine() since it multiplies
> (weight+effective load) with imbalance pct and cpu power -- we
> effectively scale this up by 5 orders of magnitude. In cases where
> prev_eff_load and this_eff_load are pretty close, this difference can
> result in a different result in wake_affine().
>
> - There's a corner case in effective_load(), where if a task wakes up
> on an empty cfs_rq, you could hit the clamp in effective_load (i.e. <
> MIN_SHARES) which can affect prev_eff_load (you get a lower number --
> making it less likely to do an affine wakeup). I think this patch
> (against 3.0-rc4) will address that issue -- can you please give this
> a try?
I had tried disable CONFIG_FAIR_GROUP_SCHED, and the problem still here.
So, it won't have effect.
>
> diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
> index 433491c..6fcfbfc 100644
> --- a/kernel/sched_fair.c
> +++ b/kernel/sched_fair.c
> @@ -1442,8 +1442,8 @@ static long effective_load(struct task_group
> *tg, int cpu, long wl, long wg)
> wl = tg->shares;
>
> /* zero point is MIN_SHARES */
> - if (wl < MIN_SHARES)
> - wl = MIN_SHARES;
> + if (wl < scale_load(MIN_SHARES))
> + wl = scale_load(MIN_SHARES);
> wl -= se->load.weight;
> wg = 0;
> }
next prev parent reply other threads:[~2011-06-30 8:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-23 2:43 power increase issue on light load Alex,Shi
2011-06-23 9:02 ` Peter Zijlstra
2011-06-24 0:41 ` Alex,Shi
2011-06-28 0:02 ` Alex,Shi
2011-06-28 14:59 ` Peter Zijlstra
2011-06-28 17:13 ` Nikhil Rao
2011-06-29 2:30 ` Nikhil Rao
2011-06-29 3:22 ` Alex,Shi
2011-06-29 6:55 ` Alex,Shi
2011-06-30 0:26 ` Nikhil Rao
2011-06-30 8:38 ` Alex,Shi
2011-06-30 0:07 ` Nikhil Rao
2011-06-30 8:34 ` Alex,Shi [this message]
2011-07-01 5:44 ` Ming Lei
2011-07-01 18:00 ` Nikhil Rao
2011-07-01 23:51 ` Ming Lei
2011-07-04 0:45 ` Alex,Shi
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=1309422861.14604.472.camel@debian \
--to=alex.shi@intel.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=ncrao@google.com \
--cc=peterz@infradead.org \
--cc=shaohua.li@intel.com \
--cc=tim.c.chen@intel.com \
/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