From: Yuyang Du <yuyang.du@intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, pjt@google.com,
bsegall@google.com, arjan.van.de.ven@intel.com,
len.brown@intel.com, rafael.j.wysocki@intel.com,
alan.cox@intel.com, mark.gross@intel.com, fengguang.wu@intel.com
Subject: Re: [RESEND PATCH 2/3 v5] sched: Rewrite per entity runnable load average tracking
Date: Wed, 22 Oct 2014 08:13:16 +0800 [thread overview]
Message-ID: <20141022001316.GC2577@intel.com> (raw)
In-Reply-To: <20141021145652.GB23531@worktop.programming.kicks-ass.net>
On Tue, Oct 21, 2014 at 04:56:52PM +0200, Peter Zijlstra wrote:
> On Fri, Oct 10, 2014 at 10:21:56AM +0800, Yuyang Du wrote:
> > static inline long calc_tg_weight(struct task_group *tg, struct cfs_rq *cfs_rq)
> > {
> > - long tg_weight;
> > -
> > - /*
> > - * Use this CPU's actual weight instead of the last load_contribution
> > - * to gain a more accurate current total weight. See
> > - * update_cfs_rq_load_contribution().
> > - */
> > - tg_weight = atomic_long_read(&tg->load_avg);
> > - tg_weight -= cfs_rq->tg_load_contrib;
> > - tg_weight += cfs_rq->load.weight;
> > -
> > - return tg_weight;
> > + return atomic_long_read(&tg->load_avg);
>
> Since you're now also delaying updating load_avg, why not retain this
> slightly better approximation?
Oh, yeah, I know load_avg is delayed, but I don't know why this is slightly better
approximation, in which "Use this CPU's actual weight instead of the last
load_contribution".
In addition to that, if we use this approximation, should we worry that
the child cfs and group's added weight is toward likely to be underrated? No?
or we do this instead:
tg_weight = atomic_long_read(&tg->load_avg);
tg_weight -= cfs_rq->tg_load_contrib;
tg_weight += cfs_rq->load_avg;
~~~~~~~~
Thanks,
Yuyang
next prev parent reply other threads:[~2014-10-22 8:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-10 2:21 [RESEND PATCH 0/3 v5] sched: Rewrite per entity runnable load average tracking Yuyang Du
2014-10-10 2:21 ` [RESEND PATCH 1/3 v5] sched: Remove update_rq_runnable_avg Yuyang Du
2014-10-22 0:23 ` Yuyang Du
2014-10-10 2:21 ` [RESEND PATCH 2/3 v5] sched: Rewrite per entity runnable load average tracking Yuyang Du
2014-10-21 14:32 ` Peter Zijlstra
2014-10-21 23:33 ` Yuyang Du
2014-10-21 14:54 ` Peter Zijlstra
2014-10-21 23:39 ` Yuyang Du
2014-10-21 14:56 ` Peter Zijlstra
2014-10-22 0:13 ` Yuyang Du [this message]
2014-10-22 10:04 ` Peter Zijlstra
2014-10-22 10:28 ` Peter Zijlstra
2014-10-23 11:06 ` Dietmar Eggemann
2014-10-23 11:06 ` Dietmar Eggemann
2014-10-24 1:49 ` Yuyang Du
2014-10-10 2:21 ` [RESEND PATCH 3/3 v5] sched: Remove task and group entity load_avg when they are dead Yuyang Du
2014-10-22 10:31 ` Peter Zijlstra
2014-10-10 10:25 ` [RESEND PATCH 0/3 v5] sched: Rewrite per entity runnable load average tracking Peter Zijlstra
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=20141022001316.GC2577@intel.com \
--to=yuyang.du@intel.com \
--cc=alan.cox@intel.com \
--cc=arjan.van.de.ven@intel.com \
--cc=bsegall@google.com \
--cc=fengguang.wu@intel.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.gross@intel.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=rafael.j.wysocki@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