lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 8 Jan 2020 14:02:10 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     chenying <chen.ying153@....com.cn>, mingo@...hat.com,
        juri.lelli@...hat.com, vincent.guittot@...aro.org,
        dietmar.eggemann@....com, bsegall@...gle.com, mgorman@...e.de,
        linux-kernel@...r.kernel.org, xue.zhihong@....com.cn,
        wang.yi59@....com.cn, jiang.xuexin@....com.cn
Subject: Re: [PATCH] fix share rt runtime with offline rq

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]);
 	}
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ