linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Tejun Heo <tj@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Mike Galbraith <efault@gmx.de>, Paul Turner <pjt@google.com>,
	Chris Mason <clm@fb.com>,
	kernel-team@fb.com
Subject: Re: [PATCH 1/3] sched/fair: Peter's shares_type patch
Date: Thu, 11 May 2017 08:59:05 +0200	[thread overview]
Message-ID: <20170511065905.xoiekzjl4rnhdx36@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAKfTPtC-Z=zQB6W=TxaqBDVv0B6aww3xrRm50bgiNsWnkkoZ0w@mail.gmail.com>

On Wed, May 10, 2017 at 06:07:14PM +0200, Vincent Guittot wrote:
> On 10 May 2017 at 17:09, Tejun Heo <tj@kernel.org> wrote:
> > Hello, Vincent.
> >
> > On Fri, May 05, 2017 at 11:30:31AM -0400, Tejun Heo wrote:
> >> > For shares_runnable, it should be
> >> >
> >> > group_entity->runnable_load_avg = cfs_rq->runnable_load_avg *
> >> > group_entity->avg.load_avg / cfs_rq->avg.load_avg
> >>
> >> Yeah, that could be one way to calculate the value while avoiding the
> >> artifacts.  Hmmm... IIUC, replacing the local contribution with the
> >> current one is to ensure that we at least calculate with the current
> >> term on the local queue.  This makes sense for weight and shares but
> >> as you pointed out it doesn't make sense to replace local base with
> >> runnable when the base is expected to be sum of load_avgs.  How about
> >> something like the following?
> >
> > Vincent, have you given this patch a try?
> 
> No I haven't.
> My understand of Peter's feedback is that calc_cfs_shares should not
> be the place where to implement calculation of
> group_entity->runnable_load_avg and group_entity->avg.load_avg when
> propagating

Right, so I have a pile of patches that implement all that my longish
email outlined. I'm just chasing some strange behaviour; in particular
I'm having runnable_load_avg > load_avg, which is something that should
not happen.

It _looks_ like the add/sub cycle leaks a little and a lot of such
cycles then push runnable_load_avg out. I've not managed to pin it down.

If I don't find it, I'll send it out regardless as an RFC so that others
can 'enjoy'.


One request for Chris / Tejun, could you guys pretty please make a
reproducible benchmark? Relying on some ill specified background noise
just doesn't work, as this thread has clearly illustrated, nobody can
reproduce your issue.

And although I think the specific issue has been fairly well explained,
it would be good to have a working benchmark to prove the point.

  reply	other threads:[~2017-05-11  6:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-04 20:28 [RFC PATCHSET v2] sched/fair: fix load balancer behavior when cgroup is in use Tejun Heo
2017-05-04 20:29 ` [PATCH 1/3] sched/fair: Peter's shares_type patch Tejun Heo
2017-05-05 10:40   ` Vincent Guittot
2017-05-05 15:30     ` Tejun Heo
2017-05-10 15:09       ` Tejun Heo
2017-05-10 16:07         ` Vincent Guittot
2017-05-11  6:59           ` Peter Zijlstra [this message]
2017-05-05 15:41     ` Peter Zijlstra
2017-05-04 20:29 ` [PATCH 2/3] sched/fair: Add load_weight->runnable_load_{sum|avg} Tejun Heo
2017-05-05 13:22   ` Dietmar Eggemann
2017-05-05 13:26     ` Tejun Heo
2017-05-05 13:37       ` Dietmar Eggemann
2017-05-04 20:30 ` [PATCH 3/3] sched/fair: Propagate runnable_load_avg independently from load_avg Tejun Heo
2017-05-05 10:42   ` Vincent Guittot
2017-05-05 12:18     ` Vincent Guittot
2017-05-05 13:26       ` Tejun Heo
2017-05-05 16:51   ` Vincent Guittot
2017-05-05  8:46 ` [RFC PATCHSET v2] sched/fair: fix load balancer behavior when cgroup is in use Vincent Guittot
2017-05-05 13:28   ` Tejun Heo
2017-05-05 13:32     ` Vincent Guittot

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=20170511065905.xoiekzjl4rnhdx36@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=clm@fb.com \
    --cc=efault@gmx.de \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pjt@google.com \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).