From: Dietmar Eggemann <dietmar.eggemann@arm.com> To: Qais Yousef <qais.yousef@arm.com> Cc: Ingo Molnar <mingo@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Steven Rostedt <rostedt@goodmis.org>, Pavan Kondeti <pkondeti@codeaurora.org>, Juri Lelli <juri.lelli@redhat.com>, Vincent Guittot <vincent.guittot@linaro.org>, Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 6/6] sched/rt: Remove unnecessary assignment in inc/dec_rt_migration Date: Mon, 24 Feb 2020 13:03:23 +0000 [thread overview] Message-ID: <90e4af9c-b4e3-00bf-ebe6-5d4fe6f892aa@arm.com> (raw) In-Reply-To: <20200224123123.gbox3tcqcist7bbg@e107158-lin.cambridge.arm.com> On 24.02.20 12:31, Qais Yousef wrote: > On 02/24/20 00:16, Dietmar Eggemann wrote: >> On 23.02.20 19:40, Qais Yousef wrote: [...] >>> - rt_rq = &rq_of_rt_rq(rt_rq)->rt; >> >> IMHO, this is here to get the root rt_rq from any rt_rq (task_groups). >> Looks like that e.g rt_nr_total is only maintained on root rt_rq's. >> >> Similar to CFS' &rq_of(cfs_rq)->cfs (cfs_rq_util_change()) to get root >> cfs_rq. >> >> Not sure where CONFIG_RT_GROUP_SCHED=y is used but it's part of the rt >> class implementation. > > Ah I see. That was obvious.. How about the below comment? > > This code is executed only if rt_entity_is_task(), I don't think this grantees > that the rt_rq isn't for a group? No, an rt task can run in this taskgroup (e.g. "/tg/tg1"), i.e. in tg1->rt_rq[cpu]. The taskgroup skeleton rt_se of e.g. "/tg/tg1/tg11" would also run in tg1->rt_rq[cpu] but for those rt_se's we bail out of [inc/dec]_rt_migration. > > I need to go and unravel the layers maybe. > > Thanks! > > -- > Qais Yousef > > -->8-- > > diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c > index b35e49cdafcc..f929867215c4 100644 > --- a/kernel/sched/rt.c > +++ b/kernel/sched/rt.c > @@ -343,6 +343,8 @@ static void inc_rt_migration(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq) > return; > > p = rt_task_of(rt_se); > + > + /* get the root rt_rq if this is the rt_rq of a group */ Not sure if a comment like this will help since: (a) the definition of rq_of_rt_rq() for the !CONFIG_RT_GROUP_SCHED case (b) rt_rq might already be the root rt_rq in case the task runs in "/" [...]
next prev parent reply other threads:[~2020-02-24 13:03 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-23 18:39 [PATCH v2 0/6] RT Capacity Awareness Fixes & Improvements Qais Yousef 2020-02-23 18:39 ` [PATCH v2 1/6] sched/rt: cpupri_find: implement fallback mechanism for !fit case Qais Yousef 2020-02-23 18:39 ` [PATCH v2 2/6] sched/rt: Re-instate old behavior in select_task_rq_rt Qais Yousef 2020-02-25 15:21 ` Dietmar Eggemann 2020-02-26 11:34 ` Qais Yousef 2020-02-23 18:39 ` [PATCH v2 3/6] sched/rt: Optimize cpupri_find on non-heterogenous systems Qais Yousef 2020-02-23 18:39 ` [PATCH v2 4/6] sched/rt: allow pulling unfitting task Qais Yousef 2020-02-23 18:40 ` [PATCH v2 5/6] sched/rt: Better manage pushing unfit tasks on wakeup Qais Yousef 2020-02-24 6:10 ` Pavan Kondeti 2020-02-24 12:11 ` Qais Yousef 2020-02-24 16:04 ` Pavan Kondeti 2020-02-24 17:41 ` Qais Yousef 2020-02-25 3:55 ` Pavan Kondeti 2020-02-26 16:02 ` Qais Yousef 2020-02-27 3:36 ` Pavan Kondeti 2020-02-27 10:29 ` Qais Yousef 2020-02-23 18:40 ` [PATCH v2 6/6] sched/rt: Remove unnecessary assignment in inc/dec_rt_migration Qais Yousef 2020-02-23 23:16 ` Dietmar Eggemann 2020-02-24 12:31 ` Qais Yousef 2020-02-24 13:03 ` Dietmar Eggemann [this message] 2020-02-24 13:47 ` Qais Yousef
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=90e4af9c-b4e3-00bf-ebe6-5d4fe6f892aa@arm.com \ --to=dietmar.eggemann@arm.com \ --cc=bsegall@google.com \ --cc=juri.lelli@redhat.com \ --cc=linux-kernel@vger.kernel.org \ --cc=mgorman@suse.de \ --cc=mingo@kernel.org \ --cc=peterz@infradead.org \ --cc=pkondeti@codeaurora.org \ --cc=qais.yousef@arm.com \ --cc=rostedt@goodmis.org \ --cc=vincent.guittot@linaro.org \ --subject='Re: [PATCH v2 6/6] sched/rt: Remove unnecessary assignment in inc/dec_rt_migration' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).