Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2541755ybi; Mon, 1 Jul 2019 13:54:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxgwGZT7ZQmxDwxquvlBKHJ2DrYCJrYEAnyFwodXMqKYEK3fUIyCiX6F6hBXoqifpaVsLTd X-Received: by 2002:a17:90a:8a17:: with SMTP id w23mr1263291pjn.139.1562014467256; Mon, 01 Jul 2019 13:54:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562014467; cv=none; d=google.com; s=arc-20160816; b=m5u7xMM/hBAk5Pb6lJ1XZn8KHK6PQQYRfkEu19BMTvlDs9ZtvkFGmkkdZ6dIArLxCx LRoDEeTuDdDFUzFBzIv+2Rn62y+rWPJcxiBaitDFMEij+wIPI5uDIvhIzowethhYhrqn 2Pg+DptHsDMMxaUsfFqQhGbqJz4lxxdztZgn0f1s3g8vzs7Yc/Ihxv8aD8QzJ3mD+ac0 gGvtcY4PWTfp1JrpfofhdNOQfuydCE/cIlxt2oYb50UIx+2kLk9celGCZdO7+rkCW5rS i8uEwM70S3EqRMWoI75MU9RViPwKz1cDhTuyb8uCJxOR5RElGeYdHwfMy4kih8ruDGGf AQEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=Xr2nqiCuimIEPjox/m9GAkN/wURtwVkWloclJRZHhDE=; b=CfSmH0FQpuu7nmU3O1YitnXgc/G5IYM3J3mke/WKqIqugtm0cJi6ixO1UOgl2pBehC MsySVUBy6/KoRqC2EVRG7W/kBPcLnURlx5T7QdHV97fy/Y5PNAjfmWWO57TyUCr+bHP2 L9I9GBk5/S+ZQFMLXV/+VlkqUG/72gl3tiFYqEcrVHmWF/jkP+O6XkCkc2xgdsSrfbOM nP/4IVjKSToEnchhzqY5hZXedMxT4DxGyvJzLPgsNFChzWqfDiNBtYcoVXl1BwCZLyTb lXa44oPwZEWsrTP0YxGsCaCzsYJWropNQZNpKGeZi0ehOr3psYsez7U6DQ7DltUOyQaG g0eg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w64si1048576pgd.485.2019.07.01.13.54.12; Mon, 01 Jul 2019 13:54:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726787AbfGAUxp (ORCPT + 99 others); Mon, 1 Jul 2019 16:53:45 -0400 Received: from shelob.surriel.com ([96.67.55.147]:46210 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726509AbfGAUxp (ORCPT ); Mon, 1 Jul 2019 16:53:45 -0400 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hi3Iv-0000qT-P3; Mon, 01 Jul 2019 16:53:37 -0400 Message-ID: <402b70ecb4d362ab6975b00a715872d585a18e35.camel@surriel.com> Subject: Re: [PATCH 09/10] sched,fair: add helper functions for flattened runqueue From: Rik van Riel To: Josef Bacik Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, pjt@google.com, dietmar.eggemann@arm.com, peterz@infradead.org, mingo@redhat.com, morten.rasmussen@arm.com, tglx@linutronix.de, mgorman@techsingularity.net, vincent.guittot@linaro.org Date: Mon, 01 Jul 2019 16:53:37 -0400 In-Reply-To: <20190701202030.6sm7mdztyt6t5mui@macbook-pro-91.dhcp.thefacebook.com> References: <20190628204913.10287-1-riel@surriel.com> <20190628204913.10287-10-riel@surriel.com> <20190701202030.6sm7mdztyt6t5mui@macbook-pro-91.dhcp.thefacebook.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-/fJqEuLegJr6SIMQrnRg" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-/fJqEuLegJr6SIMQrnRg Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2019-07-01 at 16:20 -0400, Josef Bacik wrote: >=20 >=20 > > +static unsigned long task_se_h_weight(struct sched_entity *se) > > +{ > > + struct cfs_rq *cfs_rq; > > + > > + if (!task_se_in_cgroup(se)) > > + return se->load.weight; > > + > > + cfs_rq =3D group_cfs_rq_of_parent(se); > > + update_cfs_rq_h_load(cfs_rq); > > + > > + /* Reduce the load.weight by the h_load of the group the task > > is in. */ > > + return (cfs_rq->h_load * se->load.weight) >> > > SCHED_FIXEDPOINT_SHIFT; >=20 > This should be >=20 > scale_load_down(cfs_rq->h_load * se->load.weight); That may be the same mathematically, but it is different conceptually. If we convert CFS to have full load resolution with cgroups (which we probably want), then scale_load_down becomes a noop, while this shift continues doing the right thing. --=20 All Rights Reversed. --=-/fJqEuLegJr6SIMQrnRg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAl0actEACgkQznnekoTE 3oPlkgf/Uujb+s6pe36le/hbVdu/UijyO1aWgMjnXeAkjye8C3yuFErAVkwzJBW0 0sOawT1lubaA+ImmD6Bl77UI8zwvldxaRCUs8RE/ESb8wf73bmuUrwpzfoGlOpb3 tcSvCY5N+gJtrZGZxHLUQBR64uUcq0QUigfxBcTrc6RNXw+ZkixRkjukn0/poFOx MQYP/Ks4QgNP0L0LF3V4bgiua/pLiXtMVni2rEPD5JeF+NfEGi88jpoR9As+3Iy8 gNuHzPkMVJQ2yx6NHAyKtDvzXM7zGYp7pzbw5Kk0ZPQb3sR08pdkc1BwjJRVa9U9 VMls7LdN4imt1/L1pYA1UGC3lbM95w== =ujDc -----END PGP SIGNATURE----- --=-/fJqEuLegJr6SIMQrnRg--