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
| ||
|
Message-Id: <1356799386-4212-23-git-send-email-fweisbec@gmail.com> Date: Sat, 29 Dec 2012 17:43:01 +0100 From: Frederic Weisbecker <fweisbec@...il.com> To: LKML <linux-kernel@...r.kernel.org> Cc: Frederic Weisbecker <fweisbec@...il.com>, Alessio Igor Bogani <abogani@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>, Chris Metcalf <cmetcalf@...era.com>, Christoph Lameter <cl@...ux.com>, Geoff Levand <geoff@...radead.org>, Gilad Ben Yossef <gilad@...yossef.com>, Hakan Akkan <hakanakkan@...il.com>, Ingo Molnar <mingo@...nel.org>, "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>, Paul Gortmaker <paul.gortmaker@...driver.com>, Peter Zijlstra <peterz@...radead.org>, Steven Rostedt <rostedt@...dmis.org>, Thomas Gleixner <tglx@...utronix.de> Subject: [PATCH 22/27] nohz: Don't turn off the tick if rcu needs it If RCU is waiting for the current CPU to complete a grace period, don't turn off the tick. Unlike dynctik-idle, we are not necessarily going to enter into rcu extended quiescent state, so we may need to keep the tick to note current CPU's quiescent states. [added build fix from Zen Lin] CHECKME: OTOH we don't want to handle a locally started grace period, this should be offloaded for rcu_nocb CPUs. What we want is to be kicked if we stay dynticks in the kernel for too long (ie: to report a quiescent state). rcu_pending() is perhaps an overkill just for that. Signed-off-by: Frederic Weisbecker <fweisbec@...il.com> Cc: Alessio Igor Bogani <abogani@...nel.org> Cc: Andrew Morton <akpm@...ux-foundation.org> Cc: Chris Metcalf <cmetcalf@...era.com> Cc: Christoph Lameter <cl@...ux.com> Cc: Geoff Levand <geoff@...radead.org> Cc: Gilad Ben Yossef <gilad@...yossef.com> Cc: Hakan Akkan <hakanakkan@...il.com> Cc: Ingo Molnar <mingo@...nel.org> Cc: Paul E. McKenney <paulmck@...ux.vnet.ibm.com> Cc: Paul Gortmaker <paul.gortmaker@...driver.com> Cc: Peter Zijlstra <peterz@...radead.org> Cc: Steven Rostedt <rostedt@...dmis.org> Cc: Thomas Gleixner <tglx@...utronix.de> Signed-off-by: Steven Rostedt <rostedt@...dmis.org> --- include/linux/rcupdate.h | 1 + kernel/rcutree.c | 3 +-- kernel/time/tick-sched.c | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 829312e..2ebadac 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -211,6 +211,7 @@ static inline int rcu_preempt_depth(void) extern void rcu_sched_qs(int cpu); extern void rcu_bh_qs(int cpu); extern void rcu_check_callbacks(int cpu, int user); +extern int rcu_pending(int cpu); struct notifier_block; extern void rcu_idle_enter(void); extern void rcu_idle_exit(void); diff --git a/kernel/rcutree.c b/kernel/rcutree.c index e9e0ffa..6ba3e02 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@ -232,7 +232,6 @@ module_param(jiffies_till_next_fqs, ulong, 0644); static void force_qs_rnp(struct rcu_state *rsp, int (*f)(struct rcu_data *)); static void force_quiescent_state(struct rcu_state *rsp); -static int rcu_pending(int cpu); /* * Return the number of RCU-sched batches processed thus far for debug & stats. @@ -2521,7 +2520,7 @@ static int __rcu_pending(struct rcu_state *rsp, struct rcu_data *rdp) * by the current CPU, returning 1 if so. This function is part of the * RCU implementation; it is -not- an exported member of the RCU API. */ -static int rcu_pending(int cpu) +int rcu_pending(int cpu) { struct rcu_state *rsp; diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 78e5341..04504c4 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -596,6 +596,9 @@ static bool can_stop_full_tick(int cpu) if (!rcu_is_nocb_cpu(cpu)) return false; + if (rcu_pending(cpu)) + return false; + return true; } #endif -- 1.7.5.4 -- 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