From: Michal =?iso-8859-1?Q?Koutn=FD?= Subject: Re: [PATCH v13 2/6] sched/core: uclamp: Propagate parent clamps Date: Thu, 8 Aug 2019 19:16:21 +0200 Message-ID: <20190808171620.GE8617@blackbody.suse.cz> References: <20190802090853.4810-1-patrick.bellasi@arm.com> <20190802090853.4810-3-patrick.bellasi@arm.com> <20190806161153.GA19991@blackbody.suse.cz> <87h86r4rvp.fsf@arm.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="M/SuVGWktc5uNpra" Return-path: Content-Disposition: inline In-Reply-To: <87h86r4rvp.fsf@arm.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: To: Patrick Bellasi Cc: Alessio Balsini , Dietmar Eggemann , Morten Rasmussen , Quentin Perret , Joel Fernandes , Paul Turner , Steve Muckle , Suren Baghdasaryan , Todd Kjos , Peter Zijlstra , "Rafael J . Wysocki" , Tejun Heo , VincentGuittot , Viresh Kumar , Juri Lelli , Ingo Molnar , cgroups@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org --M/SuVGWktc5uNpra Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 08, 2019 at 04:08:10PM +0100, Patrick Bellasi wrote: > Well, if I've got correctly your comment in the previous message, I > would say that at this stage we don't need RCU looks at all. Agreed. > Reason being that cpu_util_update_eff() gets called only from > cpu_uclamp_write() which is from an ongoing write operation on a cgroup > attribute and thus granted to be available. >=20 > We will eventually need to move the RCU look only down the stack when > uclamp_update_active_tasks() gets called to update the RUNNABLE tasks on > a RQ... or perhaps we don't need them since we already get the > task_rq_lock() for each task we visit. Unless you remove css_for_each_descendant_pre() in cpu_util_update_eff(), the rcu_read_lock() cannot go below it. (You'd be RCU-accessing other csses that aren't pinned in the write.) Michal --M/SuVGWktc5uNpra Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEEoQaUCWq8F2Id1tNia1+riC5qSgFAl1MWN8ACgkQia1+riC5 qSityw/+JXOBnu4pwW3aN+tZLpsDmQp30H/RvF8UM9xruXiajWC8seiPhBHO/K+d NTgTcMYp4XLXOBDOPR1OvFFLAhgv38xf4R4+kyvg9Z6Yq0jRbOQR6t/foXIOEKV4 OhkPVNl57zVqJoUmTMN5I7ld8AM/dA4RPas3vG9qLrALc1cycaSGmeTNRNzGo3Ga zhNO5KOYipeQoMJJw+KslJgfUctj7YPLKrIDeqt7wRJ6s1rJ8srqlR4QJiqnwvpt Adit3pj4WaOMaYJhX7HuAgEn26kwKkX1Edw9a7BJQny2Zu+CxPrR7AkHPD/eTJyG XHHBBhW3vsKGYkOSpSTavv1Pc+402OkteacYPiP7Hh38UHPEeOnKjAwJFnDRDUKJ mwOw08r0d7tMZKBnMgchOPtpOATD2M9/No9z8TVFoxILfcXpMjEQE6apYVNH2rvl vJkH7wujXxbkWCgL6xopQdyG//G/vGHrPPWJmlhNMvL4Y/KRwj7zEqMvOHC1XQAt WpqQGv5uI6R0WZv31qSIkoXGsfnNx2oz/tR16SpAQUvKRu7en2KwgvzHQGbBfXmV LuNR/iu0/tuOac76MEvdu3dAAyoccmdmYmBZSKm0/+wcqDAa8SKu3CIWhWb8Bu5P +LzuhocAwLPW4ZGSUxuQ+np/D+SyqOJSIhJIlqAmSPtG6TMDGkI= =LPyl -----END PGP SIGNATURE----- --M/SuVGWktc5uNpra--