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
| ||
|
Date: Mon, 20 Dec 2010 12:05:30 -0500 From: Steven Rostedt <rostedt@...dmis.org> To: Peter Zijlstra <a.p.zijlstra@...llo.nl> Cc: Frederic Weisbecker <fweisbec@...il.com>, LKML <linux-kernel@...r.kernel.org>, Thomas Gleixner <tglx@...utronix.de>, "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>, Ingo Molnar <mingo@...e.hu>, Lai Jiangshan <laijs@...fujitsu.com>, Andrew Morton <akpm@...ux-foundation.org>, Anton Blanchard <anton@....ibm.com>, Tim Pepper <lnxninja@...ux.vnet.ibm.com> Subject: Re: [RFC PATCH 13/15] sched: Protect nohz task cpu affinity On Mon, 2010-12-20 at 17:28 +0100, Peter Zijlstra wrote: > On Mon, 2010-12-20 at 16:24 +0100, Frederic Weisbecker wrote: > > Don't allow to change a nohz task cpu affinity as we want them > > to be bound to a single CPU and we want this affinity not to > > change. > > > > Signed-off-by: Frederic Weisbecker <fweisbec@...il.com> > > Cc: Thomas Gleixner <tglx@...utronix.de> > > Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl> > > Cc: Paul E. McKenney <paulmck@...ux.vnet.ibm.com> > > Cc: Ingo Molnar <mingo@...e.hu> > > Cc: Steven Rostedt <rostedt@...dmis.org> > > Cc: Lai Jiangshan <laijs@...fujitsu.com> > > Cc: Andrew Morton <akpm@...ux-foundation.org> > > Cc: Anton Blanchard <anton@....ibm.com> > > Cc: Tim Pepper <lnxninja@...ux.vnet.ibm.com> > > --- > > kernel/sched.c | 7 +++++++ > > 1 files changed, 7 insertions(+), 0 deletions(-) > > > > diff --git a/kernel/sched.c b/kernel/sched.c > > index 4412493..bd0a41f 100644 > > --- a/kernel/sched.c > > +++ b/kernel/sched.c > > @@ -5712,6 +5712,13 @@ again: > > goto out; > > } > > > > + /* Nohz tasks must keep their affinity */ > > + if (test_tsk_thread_flag(p, TIF_NOHZ) && > > + !cpumask_equal(&p->cpus_allowed, new_mask)) { > > + ret = -EBUSY; > > + goto out; > > + } > > + > > if (p->sched_class->set_cpus_allowed) > > p->sched_class->set_cpus_allowed(p, new_mask); > > else { > > NAK, this is really way too restrictive. Agreed, the better solution is to disable the nohz from the task. If the use just changed its affinity (or something else did), disable the nohz. Maybe you can add a printk or warning, but I'm not sure about that either. -- Steve -- 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