From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Alex Shi <alex.shi@linaro.org>
Cc: Morten Rasmussen <morten.rasmussen@arm.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Linaro Kernel <linaro-kernel@lists.linaro.org>,
Amit Kucheria <amit.kucheria@linaro.org>,
Mark Brown <broonie@linaro.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [discussion] simpler load balance in scheduler
Date: Sun, 19 Jan 2014 19:04:53 -0800 [thread overview]
Message-ID: <20140120030453.GO10038@linux.vnet.ibm.com> (raw)
In-Reply-To: <52CAB344.9050208@linaro.org>
On Mon, Jan 06, 2014 at 09:44:36PM +0800, Alex Shi wrote:
> On 12/18/2013 12:32 AM, Paul E. McKenney wrote:
> > On Fri, Dec 13, 2013 at 06:09:47PM +0800, Alex Shi wrote:
[ . . . ]
> > 3. Allow the exported values to become inaccurate, and resample
> > the actual values remotely if extrapolated values indicate
> > that action is warranted.
>
> It is a very heuristic idea! Could you give a bit more hints/clues to
> get remote cpu load by extrapolated value? I know RCU use this way
> wonderfully. but still no much idea to get live cpu load...
Well, as long as the CPU continues doing the same thing, for example,
being idle or running a user-mode task, the extrapolation should be
exact, right? The load value was X the last time the CPU changed state,
and T time has passed since then, so you can calculated it exactly.
The exact method for detecting inaccuracies depends on how and where
you are calculating the load values. If you are calculating them on
each state change (as is done for some values for NO_HZ_FULL), then you
simply need sufficient synchronization for geting a consistent snapshot
of several values. One easy way to do this is via a per-CPU seqlock.
The state-change code write-acquires the seqlock, while those doing
extrapolation read-acquire it and retry if changes occur. This can have
problems if too many values are required and if changes occur too fast,
but such problems can be addressed should they occur.
Does that help?
Thanx, Paul
> > There are probably other approaches. I am being quite general here
> > because I don't have the full picture of the scheduler statistics
> > in my head. It is likely possible to obtain a much better approach
> > by considering the scheduler's specifics.
> >
> >>> BTW, to reduce unnecessary remote info fetching, we can use current
> >>> idle_cpus_mask in nohz, we just skip the idle cpu in this cpumask simply.
>
> [..]
> >
> > Thanx, Paul
> >
> >>> 4, From power saving POV, top-down give the whole system cpu topology
> >>> info directly. So beside the CS reducing, it can reduce the idle cpu
> >>> interfere by a transition task. and let idle cpu sleep better.
>
> --
> Thanks
> Alex
>
next prev parent reply other threads:[~2014-01-20 3:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <52A95588.5040905@linaro.org>
[not found] ` <52AADCEB.50105@linaro.org>
[not found] ` <20131217163232.GI5919@linux.vnet.ibm.com>
2014-01-06 13:44 ` [discussion] simpler load balance in scheduler Alex Shi
2014-01-20 3:04 ` Paul E. McKenney [this message]
2014-01-21 8:52 ` 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=20140120030453.GO10038@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=alex.shi@linaro.org \
--cc=amit.kucheria@linaro.org \
--cc=broonie@linaro.org \
--cc=daniel.lezcano@linaro.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=morten.rasmussen@arm.com \
--cc=peterz@infradead.org \
--cc=vincent.guittot@linaro.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