From: Morten Rasmussen <morten.rasmussen@arm.com>
To: Alex Shi <alex.shi@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
"fweisbec@gmail.com" <fweisbec@gmail.com>,
"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
"tony.luck@intel.com" <tony.luck@intel.com>,
"fenghua.yu@intel.com" <fenghua.yu@intel.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"arjan@linux.intel.com" <arjan@linux.intel.com>,
"pjt@google.com" <pjt@google.com>,
"fengguang.wu@intel.com" <fengguang.wu@intel.com>,
"james.hogan@imgtec.com" <james.hogan@imgtec.com>,
"jason.low2@hp.com" <jason.low2@hp.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"hanjun.guo@linaro.org" <hanjun.guo@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/4] sched: remove cpu_load decay
Date: Tue, 17 Dec 2013 14:04:57 +0000 [thread overview]
Message-ID: <20131217140457.GF10134@e103034-lin> (raw)
In-Reply-To: <52AC5CDF.8050209@linaro.org>
On Sat, Dec 14, 2013 at 01:27:59PM +0000, Alex Shi wrote:
> On 12/14/2013 04:03 AM, Peter Zijlstra wrote:
> >
> >
> > I had a quick peek at the actual patches.
> >
> > afaict we're now using weighted_cpuload() aka runnable_load_avg as the
> > ->cpu_load. Whatever happened to also using the blocked_avg?
AFAICT, ->cpu_load is actually a snapshot value of weigthed_cpuload()
that gets updated occasionally. That has been the case since b92486cb.
By removing the cpu_load indexes {source,target}_load are now comparing
an old snapshot of weighted_cpuload() with the current value. I don't
think that really makes sense. weighted_cpuload() may change rapidly
when tasks are enqueued or dequeued so the old snapshot doesn't have
much meaning in my opinion. Maybe I'm missing something?
Comparing cpu_load indexes with different decay rates in {source,
target}_load() sort of make sense as it makes load-balancing decisions
more conservative.
If we can indeed remove decayed cpu_load there is more code that should
be revisited and potentially be ripped out. {source,target}_load() could
probably be reduced to weighted_cpuload(), which would change the
load-balance behaviour. However, these patches already affect
load-balancing as indicated by the fix in patch 4.
I believe we have discussed using blocked_load_avg in weighted_cpuload()
in the past. While it seems to be the right thing to include it, it
causes problems related to the priority scaling of the task loads.
If you include a blocked load in the weighted_cpuload() and have tiny
(very low cpu utilization) task running at very high priority, your
weighted_cpuload() will be quite high and force other normal priority
tasks away from the cpu and leaving the cpu idle most of the time.
>
> When enabling the sched_avg in load balance, I didn't find any positive
> testing result for several blocked_avg trying, just few regression. :(
>
> And since this patchset is almost clean up only, no blocked_load_avg
> trying again...
My worry here is that I don't really understand why the current code
works when the decayed cpu_load has been removed.
> >
> > I totally hate patch 4; it seems like a random hack to make up for the
> > lack of blocked_avg.
>
> Yes, this bias criteria seems a bit arbitrary. :)
This is why I think {source, target}_load() and their use need to be
reconsidered.
Morten
next prev parent reply other threads:[~2013-12-17 14:05 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-03 9:05 [PATCH 0/4] sched: remove cpu_load decay Alex Shi
2013-12-03 9:05 ` [PATCH 1/4] sched: shortcut to remove load_idx Alex Shi
2013-12-03 9:05 ` [PATCH 2/4] sched: remove rq->cpu_load[load_idx] array Alex Shi
2013-12-03 9:05 ` [PATCH 3/4] sched: clean up cpu_load update Alex Shi
2013-12-03 9:05 ` [PATCH 4/4] sched: bias to target cpu load to reduce task moving Alex Shi
2013-12-04 9:06 ` Yuanhan Liu
2013-12-04 11:25 ` Alex Shi
2013-12-17 14:10 ` Morten Rasmussen
2013-12-17 15:38 ` Peter Zijlstra
2013-12-19 13:34 ` Alex Shi
2013-12-20 11:19 ` Morten Rasmussen
2013-12-20 14:45 ` Alex Shi
2013-12-25 14:58 ` Alex Shi
2014-01-02 16:04 ` Morten Rasmussen
2014-01-06 13:35 ` Alex Shi
2014-01-07 12:55 ` Morten Rasmussen
2014-01-07 12:59 ` Peter Zijlstra
2014-01-07 13:15 ` Peter Zijlstra
2014-01-07 13:32 ` Vincent Guittot
2014-01-07 13:40 ` Peter Zijlstra
2014-01-07 15:16 ` Morten Rasmussen
2014-01-07 20:37 ` Peter Zijlstra
2014-01-08 14:15 ` Alex Shi
2013-12-03 10:26 ` [PATCH 0/4] sched: remove cpu_load decay Peter Zijlstra
2013-12-10 1:04 ` Alex Shi
2013-12-10 1:06 ` Paul Turner
2013-12-13 19:50 ` bsegall
2013-12-14 12:53 ` Alex Shi
2013-12-13 20:03 ` Peter Zijlstra
2013-12-14 13:27 ` Alex Shi
2013-12-17 14:04 ` Morten Rasmussen [this message]
2013-12-17 15:37 ` Peter Zijlstra
2013-12-17 18:12 ` Morten Rasmussen
2013-12-20 14:43 ` 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=20131217140457.GF10134@e103034-lin \
--to=morten.rasmussen@arm.com \
--cc=akpm@linux-foundation.org \
--cc=alex.shi@linaro.org \
--cc=arjan@linux.intel.com \
--cc=daniel.lezcano@linaro.org \
--cc=fengguang.wu@intel.com \
--cc=fenghua.yu@intel.com \
--cc=fweisbec@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hanjun.guo@linaro.org \
--cc=james.hogan@imgtec.com \
--cc=jason.low2@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--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