Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753803AbbGUKSy (ORCPT ); Tue, 21 Jul 2015 06:18:54 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:36814 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752299AbbGUKSx (ORCPT ); Tue, 21 Jul 2015 06:18:53 -0400 Date: Tue, 21 Jul 2015 18:18:46 +0800 From: Boqun Feng To: Yuyang Du 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 Subject: Re: [PATCH v10 6/7] sched: Provide runnable_load_avg back to cfs_rq Message-ID: <20150721101845.GB2882@fixme-laptop.cn.ibm.com> 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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline In-Reply-To: <20150721004400.GA28512@intel.com> User-Agent: Mutt/1.5.23+102 (2ca89bed6448) (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3049 Lines: 88 --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 21, 2015 at 08:44:01AM +0800, Yuyang Du wrote: > On Tue, Jul 21, 2015 at 09:08:07AM +0800, Boqun Feng wrote: > > Hi Yuyang, > >=20 > > On Wed, Jul 15, 2015 at 08:04:41AM +0800, Yuyang Du wrote: > > > The cfs_rq's load_avg is composed of runnable_load_avg and blocked_lo= ad_avg. > > > Before this series, sometimes the runnable_load_avg is used, and some= times > > > the load_avg is used. Completely replacing all uses of runnable_load_= avg > > > with load_avg may be too big a leap, i.e., the blocked_load_avg is co= ncerned > > > to result in overrated load. Therefore, we get runnable_load_avg back. > > >=20 > > > The new cfs_rq's runnable_load_avg is improved to be updated with all= of the > > > runnable sched_eneities at the same time, so the one sched_entity upd= ated and > > > the others stale problem is solved. > > >=20 > >=20 > > How about tracking cfs_rq's blocked_load_avg instead of > > runnable_load_avg, because, AFAICS: > >=20 > > cfs_rq->runnable_load_avg =3D se->avg.load_avg - cfs_rq->blocked_load_a= vg. >=20 > No, cfs_rq->runnable_load_avg =3D cfs_rq->avg.load_avg - cfs_rq->blocked_= load_avg, > without rounding errors and the like. > =20 Oh, sorry.. yeah, you're right here. > > se is the corresponding sched_entity of cfs_rq. And when we need the > > runnable_load_avg, we just calculate by the expression above. > >=20 > > This can be thought as a lazy way to update runnable_load_avg, and we > > don't need to modify __update_load_avg any more. >=20 > Not lazy at all, but adding (as of now) useless blocked_load_avg and an > extra subtraction. but we can remove runnable_load_avg tracking code in __update_load_avg, as you do in this patch, right? > Or did you forget blocked_load_avg also needs to be updated/decayed as > time elapses? I know we need to update or decay the blocked_load_avg, but we only need to update and decay when 1) entity dequeued/enqueued 2) entity migrated or 3) we need the runnable_load_avg value calcuated by blocked_load_avg, right? These are more rare than __update_load_avg called, right? Regards, Boqun --tKW2IUtsqtDRztdT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJVrhyCAAoJEEl56MO1B/q4iy0H/3mIMg7A4XsSzczmy2f/2/yK CBZ2Iuc6K8gCrUeT4y9YGXaB2ws5vPoRWeHSJuiWvn0FuQD+UEFsSuogTbu4QHKY Akdm6sNsE4U+fpEUdBn/rMjmwGC2HiPNoZTuxT4dUO50vW2p4bmgaOOVpoItDdr4 NWEJVVfu/huw9xJkLC8a5Z2bFOy0iP1yg+2lzsw5Q7HDYIU2M5tQug3ehM0XtArC bwAMh4YmRJEv5XwUir8JyPCnhxx6VEaa7XO0XOIy27kOy9n6IY4qRj+eXOGFPxMR emt0VKmsj4/J2e0dZwQW6kWmFgo7bS78r3lEMefZd7CnMu44joAC01Ux6p2pz8k= =P6DH -----END PGP SIGNATURE----- --tKW2IUtsqtDRztdT-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/