Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp992220ybd; Wed, 26 Jun 2019 09:17:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzo7gOT8buMs7D6mDaDujLf6EoTVsdLiGgDBf/7GeAWJqQzwGocPp3LBSKHJNrB4kpZJjlH X-Received: by 2002:a17:902:a504:: with SMTP id s4mr6319227plq.117.1561565865222; Wed, 26 Jun 2019 09:17:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561565865; cv=none; d=google.com; s=arc-20160816; b=rakqOVnArZTt4/4Lj4jrCYA5Br0C9+ZW08nbdFQQATuoYV/Qfgl+dvIN0bYhUz0HAZ pzylF09cehhpn3a1cgt3pkOJNYq7nnywOrrEgp5Ny5xwG4JEQdK6gZbq25hBtS8/56SC GBWql4e3EcAOMDqGllqxltCTdAtpBsG8cgJU+IfDF8sGQkTRUfk9E/yCaeuGBqhA6TJx gSIuV3zbsTuEyG+qDKhMsnrMoQpsaAsTnqDuD3IVXt158hcoqQGLS95DjynJ4ZCLAYb4 8yVmGxitcqhimAbpf0wDY3N0kmr5ebMHp7vvNrW4YTdp8mXsiyx1S80eJ/acXYCTd3b8 3Hcw== 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=9cL2ddt6VkQhFm00BVryX6ELPCRii1u0JGJkB/gURL8=; b=BNHaL6ILIGae+E74Smn/SQpaxybIeNLd0ONbQZdBFUxywazW81WIw7sW37ykWOpMss cSFNoUBvDiLKJ5yTlSwlEm1skJr2NEwYqQVP7o349N/J3q524ny4rlcoF/eppUjLIxM8 h+gA69rOxv0pdaVZ04x1UNtXoQytIBkFIxSERCDgYEPVEUcBS9Pl55vbMHVRSbj0khUm wO3bjUnoxlsI/WeqJF7w1lWeKWHb2PkOaH1ZTx0s72O+pTq/buRDNKqOEGRi6SjEdI+4 wJkBnbQWklH5EXci3gEpmiqL6f0SEbdh7wxXnrp60u8tH5DWAOR5rsQgOoMCWuuUbvTH NIlA== 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 m12si853094pfa.81.2019.06.26.09.17.29; Wed, 26 Jun 2019 09:17:45 -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 S1726651AbfFZQPM (ORCPT + 99 others); Wed, 26 Jun 2019 12:15:12 -0400 Received: from shelob.surriel.com ([96.67.55.147]:58008 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbfFZQPM (ORCPT ); Wed, 26 Jun 2019 12:15:12 -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 1hgAZd-0003CK-II; Wed, 26 Jun 2019 12:15:05 -0400 Message-ID: <80debf449017604657abd9086d81b8cfc0e0ad5e.camel@surriel.com> Subject: Re: [PATCH 5/8] sched,cfs: use explicit cfs_rq of parent se helper From: Rik van Riel To: Dietmar Eggemann , peterz@infradead.org Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, kernel-team@fb.com, morten.rasmussen@arm.com, tglx@linutronix.de, mgorman@techsingularity.com, vincent.guittot@linaro.org Date: Wed, 26 Jun 2019 12:15:05 -0400 In-Reply-To: <0032016d-78d1-8338-96af-3077d3219f47@arm.com> References: <20190612193227.993-1-riel@surriel.com> <20190612193227.993-6-riel@surriel.com> <0032016d-78d1-8338-96af-3077d3219f47@arm.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-wYMOZdD6INRRhzcHO2Cu" 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 --=-wYMOZdD6INRRhzcHO2Cu Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2019-06-26 at 17:58 +0200, Dietmar Eggemann wrote: > On 6/12/19 9:32 PM, Rik van Riel wrote: > > Use an explicit "cfs_rq of parent sched_entity" helper in a few > > strategic places, where cfs_rq_of(se) may no longer point at the > > right runqueue once we flatten the hierarchical cgroup runqueues. > >=20 > > No functional change. > >=20 > > Signed-off-by: Rik van Riel > > --- > > kernel/sched/fair.c | 17 +++++++++++++---- > > 1 file changed, 13 insertions(+), 4 deletions(-) > >=20 > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index dcc521d251e3..c6ede2ecc935 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -275,6 +275,15 @@ static inline struct cfs_rq > > *group_cfs_rq(struct sched_entity *grp) > > return grp->my_q; > > } > > =20 > > +/* runqueue owned by the parent entity */ > > +static inline struct cfs_rq *group_cfs_rq_of_parent(struct > > sched_entity *se) > > +{ > > + if (se->parent) > > + return group_cfs_rq(se->parent); > > + > > + return &cfs_rq_of(se)->rq->cfs; >=20 > The function name and the description is not 100% correct. For tasks > running naturally (not in a flattened taskgroup) in the root > taskgroup > or for the se representing a first level taskgroup (e.g. /tg1 (with > se->depth =3D 0)) it returns the root cfs_rq or easier se->cfs_rq. >=20 > So you could replace >=20 > return &cfs_rq_of(se)->rq->cfs; >=20 > with >=20 > return se->cfs_rq; >=20 > or >=20 > return cfs_rq_of(se); Good point. I will do that for the v2 series. --=20 All Rights Reversed. --=-wYMOZdD6INRRhzcHO2Cu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAl0TmgkACgkQznnekoTE 3oMhnQgAqlWTfa84qiBu5AU9Azs8y+MKl9j5ch2reI/vwTY/hQVnlNZyKkDlz4R9 Hbtvw+e/XPQt41P/bz64wLLbalMIkgkKQRtEdDlfNLm+kpM+l7d3T9oik+xACir3 whliujKCS1S6KglDFoM46/a110CCaCgemYorzZY1VWavY89vGSqqcEeLQGuS2Xm5 i+1haWrNJUr007PyvtyqPGAqhOC3gZ4n9Fb+OESMzOi5yB1kXeRSMT4Bv6XfBcBj sKyqC+2AsCqdv5hjrlbLswgh1yN6iSoXtZrDzFwLnZp6hHwXGyG+CpDbTpo00EV+ /iDEi8D/6C80G5At/k6I7ay2puXi5g== =dLeB -----END PGP SIGNATURE----- --=-wYMOZdD6INRRhzcHO2Cu--