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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1334401847.2528.65.camel@twins>
Date:	Sat, 14 Apr 2012 13:10:47 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Mike Galbraith <efault@....de>
Cc:	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...hat.com>
Subject: Re: RFC [patch] sched,cgroup_sched: convince RT_GROUP_SCHED
 throttle to work

On Tue, 2012-04-10 at 11:08 +0200, Mike Galbraith wrote:

> sched,rt: fix isolated CPUs leaving root_task_group indefinitely throttled
> 
> Root task group bandwidth replenishment must service all CPUs regardless of
> where it was last started.
> 
> Signed-off-by: Mike Galbraith <efault@....de>
> ---
>  kernel/sched/rt.c |   13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -782,6 +782,19 @@ static int do_sched_rt_period_timer(stru
>  	const struct cpumask *span;
>  
>  	span = sched_rt_period_mask();
> +#ifdef CONFIG_RT_GROUP_SCHED
> +	/*
> +	 * FIXME: isolated CPUs should really leave the root task group,

No no, that's the wrong fix, the right fix is to remove isolcpus :-)

> +	 * whether they are isolcpus or were isolated via cpusets, lest
> +	 * the timer run on a CPU which does not service all runqueues,
> +	 * potentially leaving other CPUs indefinitely throttled.  If
> +	 * isolation is really required, the user will turn the throttle
> +	 * off to kill the perturbations it causes anyway.  Meanwhile,
> +	 * this maintains functionality for boot and/or troubleshooting.
> +	 */
> +	if (rt_b == &root_task_group.rt_bandwidth)
> +		span = cpu_online_mask;
> +#endif
>  	for_each_cpu(i, span) {
>  		int enqueue = 0;
>  		struct rt_rq *rt_rq = sched_rt_period_rt_rq(rt_b, i);

I guess the alternative 'fix' is to not account the rt_runtime on
isolated cpus.. does something like the below actually work?

---
 kernel/sched/rt.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 44af55e..dc2b5b6 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -922,6 +922,9 @@ static void update_curr_rt(struct rq *rq)
 	if (!rt_bandwidth_enabled())
 		return;
 
+	if (cpumask_test_cpu(cpu_of(rq), cpu_isolated_map))
+		return;
+
 	for_each_sched_rt_entity(rt_se) {
 		rt_rq = rt_rq_of_se(rt_se);
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ