Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1192645

Re: [PATCH v10 6/7] sched: Provide runnable_load_avg back to cfs_rq

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Boqun Feng <boqun.feng@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v10 6/7] sched: Provide runnable_load_avg back to cfs_rq
Date Mon, 27 Jul 2015 06:10:02 +0200
Message-ID <pQHTI-7bD-11@gated-at.bofh.it> (permalink)
References <pMpLH-18z-3@gated-at.bofh.it> <pMpLI-18z-11@gated-at.bofh.it> <pOued-1sr-1@gated-at.bofh.it> <pOBfJ-32u-37@gated-at.bofh.it> <pOCOt-5nc-11@gated-at.bofh.it> <pOD7Q-5JB-25@gated-at.bofh.it> <pQGuB-54l-1@gated-at.bofh.it> <pQHgZ-6dy-1@gated-at.bofh.it> <pQHAl-6zT-1@gated-at.bofh.it>
X-Original-To Yuyang Du <yuyang.du@intel.com>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=6ISmnL4Bq/sXoGRbLBmjs49KfTza5MY43G1GG7kyS4E=; b=JrwQ7nu9YvsSRCFIXy4KJDMckO4zOHzOncripsu1EizNpU9NpBfNBCr36dovMxnoK8 AyWbg/qTR+pbwBaedooNrCcPcbhNIJRd8snAsRsmnw//859EHHNsD7kGzkqeMLFmrbuu VJhngGYR5KsldP+T2uw0AKWIA4ewxh82jZWeQwUf79KGwg27ryN1ut4tWPStcGKaY6mp eiM3KiUrNj8579K/xCIx5Id6oT5R+YRRkgDbSsfpysgJkfbJ1XM0ONVfz3W8lJZxI5lh +WnRP8LJ6IEmfWN5ojK67pq7mFVy4VY41rmD35Lifi+nETFxYzdNud/fA2lhoy5drZ8k h6ZA==
X-Received by 10.66.65.229 with SMTP id a5mr64414803pat.11.1437969867273; Sun, 26 Jul 2015 21:04:27 -0700 (PDT)
MIME-Version 1.0
Content-Type multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OwLcNYc0lM97+oe1"
Content-Disposition inline
User-Agent Mutt/1.5.23+102 (2ca89bed6448) (2014-03-12)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 82
Organization linux.* mail to news gateway
X-Original-Cc mingo@kernel.org, peterz@infradead.org, linux-kernel@vger.kernel.org, pjt@google.com, bsegall@google.com, morten.rasmussen@arm.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, umgwanakikbuti@gmail.com, len.brown@intel.com, rafael.j.wysocki@intel.com, arjan@linux.intel.com, fengguang.wu@intel.com
X-Original-Date Mon, 27 Jul 2015 12:04:20 +0800
X-Original-Message-ID <20150727040420.GC3328@fixme-laptop.cn.ibm.com>
X-Original-References <1436918682-4971-1-git-send-email-yuyang.du@intel.com> <1436918682-4971-7-git-send-email-yuyang.du@intel.com> <20150721010346.GA2882@fixme-laptop.cn.ibm.com> <20150721004400.GA28512@intel.com> <20150721101845.GB2882@fixme-laptop.cn.ibm.com> <20150721102956.GA5380@fixme-laptop.cn.ibm.com> <20150726184325.GB28512@intel.com> <20150727032114.GA3328@fixme-laptop.cn.ibm.com> <20150726195634.GE28512@intel.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1192645

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi Yuyang,

On Mon, Jul 27, 2015 at 03:56:34AM +0800, Yuyang Du wrote:
> On Mon, Jul 27, 2015 at 11:21:15AM +0800, Boqun Feng wrote:
> > Hi Yuyang,
> > 
> > On Mon, Jul 27, 2015 at 02:43:25AM +0800, Yuyang Du wrote:
> > > Hi Boqun,
> > > 
> > > On Tue, Jul 21, 2015 at 06:29:56PM +0800, Boqun Feng wrote:
> > > > The point is that you have already tracked the sum of runnable_load_avg
> > > > and blocked_load_avg in cfs_rq->avg.load_avg. If you're going to track
> > > > part of the sum, you'd better track the one that's updated less
> > > > frequently, right?
> > > > 
> > > > Anyway, this idea just comes into my mind. I wonder which is udpated
> > > > less frequently myself too. ;-) So I ask to see whether there is
> > > > something we can improve.
> > > 
> > > Actually, this is not the point.
> > > 
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > 1) blocked load is more "difficult" to track, hint, migrate.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

I may not get your point here? Are you saying my patch fails to handle
the migration or are you just telling me that blocked load tracking need
to take migration into consideration?

If it's the latter one, I want to say that, with blocked load or not, we
have to handle load_avg in migrations, so *adding* some code to handle
blocked load is not a big deal.

Please consider this piece of code in update_cfs_rq_load_avg(), which
decays and updates blocked_load_avg.

@@ -2656,6 +2670,12 @@ static inline int update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq)
 		long r = atomic_long_xchg(&cfs_rq->removed_load_avg, 0);
 		sa->load_avg = max_t(long, sa->load_avg - r, 0);
 		sa->load_sum = max_t(s64, sa->load_sum - r * LOAD_AVG_MAX, 0);
+
+		decay_cfs_rq_blocked_load(sa->last_update_time, cfs_rq);
+		cfs_rq->blocked_load_avg = max_t(long,
+				cfs_rq->blocked_load_avg - r, 0);
+		cfs_rq->blocked_load_sum = max_t(s64,
+				cfs_rq->blocked_load_avg - r * LOAD_AVG_MAX, 0);
 	}

Regards,
Boqun

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v10 6/7] sched: Provide runnable_load_avg back to cfs_rq Boqun Feng <boqun.feng@gmail.com> - 2015-07-27 05:30 +0200
  Re: [PATCH v10 6/7] sched: Provide runnable_load_avg back to cfs_rq Boqun Feng <boqun.feng@gmail.com> - 2015-07-27 05:40 +0200
  Re: [PATCH v10 6/7] sched: Provide runnable_load_avg back to cfs_rq Yuyang Du <yuyang.du@intel.com> - 2015-07-27 05:50 +0200
    Re: [PATCH v10 6/7] sched: Provide runnable_load_avg back to cfs_rq Boqun Feng <boqun.feng@gmail.com> - 2015-07-27 06:10 +0200
      Re: [PATCH v10 6/7] sched: Provide runnable_load_avg back to cfs_rq Yuyang Du <yuyang.du@intel.com> - 2015-07-27 06:30 +0200

csiph-web