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-25-git-send-email-fweisbec@gmail.com> Date: Sat, 29 Dec 2012 17:43:03 +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 24/27] nohz: Add some tracing Not for merge, just for debugging. 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> --- kernel/time/tick-sched.c | 27 ++++++++++++++++++++++----- 1 files changed, 22 insertions(+), 5 deletions(-) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index eb6ad3d..0e1ebff 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -142,6 +142,7 @@ static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs) ts->idle_jiffies++; } #endif + trace_printk("tick\n"); update_process_times(user_mode(regs)); profile_tick(CPU_PROFILING); } @@ -591,17 +592,30 @@ void tick_nohz_idle_enter(void) #ifdef CONFIG_NO_HZ_FULL static bool can_stop_full_tick(int cpu) { - if (!sched_can_stop_tick()) + if (!sched_can_stop_tick()) { + trace_printk("Can't stop: sched\n"); return false; + } - if (!rcu_is_nocb_cpu(cpu)) + if (!rcu_is_nocb_cpu(cpu)) { + trace_printk("Can't stop: not RCU nocb\n"); return false; + } - if (rcu_pending(cpu)) + /* + * Keep the tick if we are asked to report a quiescent state. + * This must be further optimized (avoid checks for local callbacks, + * ignore RCU in userspace, etc... + */ + if (rcu_pending(cpu)) { + trace_printk("Can't stop: RCU pending\n"); return false; + } - if (posix_cpu_timers_running(current)) + if (posix_cpu_timers_running(current)) { + trace_printk("Can't stop: posix CPU timers running\n"); return false; + } return true; } @@ -615,12 +629,15 @@ static void tick_nohz_full_stop_tick(struct tick_sched *ts) if (!tick_nohz_full_cpu(cpu) || is_idle_task(current)) return; - if (!ts->tick_stopped && ts->nohz_mode == NOHZ_MODE_INACTIVE) + if (!ts->tick_stopped && ts->nohz_mode == NOHZ_MODE_INACTIVE) { + trace_printk("Can't stop: NOHZ_MODE_INACTIVE\n"); return; + } if (!can_stop_full_tick(cpu)) return; + trace_printk("Stop tick\n"); tick_nohz_stop_sched_tick(ts, ktime_get(), cpu); #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