From: Peter Zijlstra <peterz@infradead.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: chenying <chen.ying153@zte.com.cn>,
mingo@redhat.com, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
bsegall@google.com, mgorman@suse.de,
linux-kernel@vger.kernel.org, xue.zhihong@zte.com.cn,
wang.yi59@zte.com.cn, jiang.xuexin@zte.com.cn
Subject: Re: [PATCH] fix share rt runtime with offline rq
Date: Wed, 8 Jan 2020 14:02:10 +0100 [thread overview]
Message-ID: <20200108130210.GF2844@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20191223114030.1800b4c1@gandalf.local.home>
On Mon, Dec 23, 2019 at 11:40:30AM -0500, Steven Rostedt wrote:
> > kernel/sched/rt.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> > index a532558..d20dc86 100644
> > --- a/kernel/sched/rt.c
> > +++ b/kernel/sched/rt.c
> > @@ -648,8 +648,12 @@ static void do_balance_runtime(struct rt_rq *rt_rq)
> > rt_period = ktime_to_ns(rt_b->rt_period);
> > for_each_cpu(i, rd->span) {
> > struct rt_rq *iter = sched_rt_period_rt_rq(rt_b, i);
> > + struct rq *rq = rq_of_rt_rq(iter);
> > s64 diff;
> >
> > + if (!rq->online)
> > + continue;
> > +
>
> I think this might be papering over the real issue. Perhaps
> rq_offline_rt() needs to be called for CPUs not being brought online?
Yeah, very much that. Something like the below perhaps. But I really
want to rip out the whole RT_CGROUP_SCHED stuff so we can start over.
Perhaps the poster can explain what he's using this stuff for?
---
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 4043abe45459..96a0320cfadb 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -208,7 +208,13 @@ int alloc_rt_sched_group(struct task_group *tg, struct task_group *parent)
goto err_free_rq;
init_rt_rq(rt_rq);
+
+ cpus_read_lock();
rt_rq->rt_runtime = tg->rt_bandwidth.rt_runtime;
+ if (!cpu_online(i))
+ rt_rq->rt_runtime = RUNTIME_INF;
+ cpus_read_unlock();
+
init_tg_rt_entry(tg, rt_rq, rt_se, i, parent->rt_se[i]);
}
prev parent reply other threads:[~2020-01-08 13:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-21 2:20 chenying
2019-12-23 16:40 ` Steven Rostedt
2020-01-08 13:02 ` Peter Zijlstra [this message]
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=20200108130210.GF2844@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bsegall@google.com \
--cc=chen.ying153@zte.com.cn \
--cc=dietmar.eggemann@arm.com \
--cc=jiang.xuexin@zte.com.cn \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=wang.yi59@zte.com.cn \
--cc=xue.zhihong@zte.com.cn \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®