From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Clark Williams <clark.williams@gmail.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Li Zefan <lizf@cn.fujitsu.com>, Ingo Molnar <mingo@kernel.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Mike Galbraith <efault@gmx.de>
Subject: [PATCH 32/32] nohz, not for merge: Add tickless tracing
Date: Mon, 29 Oct 2012 16:27:43 -0400 [thread overview]
Message-ID: <20121029203851.331629432@goodmis.org> (raw)
In-Reply-To: <20121029202711.062749374@goodmis.org>
[-- Attachment #1: 0032-nohz-not-for-merge-Add-tickless-tracing.patch --]
[-- Type: text/plain, Size: 2974 bytes --]
From: Frederic Weisbecker <fweisbec@gmail.com>
add hoc tickless tracing
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
arch/x86/kernel/smp.c | 2 ++
kernel/cpuset.c | 1 +
kernel/time/tick-sched.c | 7 +++++++
3 files changed, 10 insertions(+)
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
index 0bad72d..45f2176 100644
--- a/arch/x86/kernel/smp.c
+++ b/arch/x86/kernel/smp.c
@@ -264,6 +264,7 @@ finish:
void smp_reschedule_interrupt(struct pt_regs *regs)
{
ack_APIC_irq();
+ trace_printk("IPI: Scheduler\n");
inc_irq_stat(irq_resched_count);
scheduler_ipi();
/*
@@ -276,6 +277,7 @@ void smp_cpuset_update_nohz_interrupt(struct pt_regs *regs)
{
ack_APIC_irq();
irq_enter();
+ trace_printk("IPI: Nohz update\n");
tick_nohz_check_adaptive();
inc_irq_stat(irq_call_count);
irq_exit();
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 218abc8..84f099c 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1212,6 +1212,7 @@ static cpumask_t nohz_cpuset_mask;
static void flush_cputime_interrupt(void *unused)
{
+ trace_printk("IPI: flush cputime\n");
tick_nohz_flush_current_times(false);
}
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index bdd40bb..db19c2d 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -376,6 +376,7 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
if (!ts->tick_stopped) {
ts->last_tick = hrtimer_get_expires(&ts->sched_timer);
ts->tick_stopped = 1;
+ trace_printk("Stop tick\n");
}
/*
@@ -581,6 +582,7 @@ static void tick_nohz_cpuset_stop_tick(struct tick_sched *ts)
ts->saved_jiffies = jiffies;
set_thread_flag(TIF_NOHZ);
+ trace_printk("set TIF_NOHZ\n");
}
}
#else
@@ -659,6 +661,7 @@ static void __tick_nohz_restart_sched_tick(struct tick_sched *ts, ktime_t now)
ts->idle_exittime = now;
tick_nohz_restart(ts, now);
+ trace_printk("Restart sched tick\n");
}
/**
@@ -1012,6 +1015,7 @@ static void tick_nohz_restart_adaptive(void)
tick_nohz_flush_current_times(true);
tick_nohz_restart_sched_tick();
clear_thread_flag(TIF_NOHZ);
+ trace_printk("clear TIF_NOHZ\n");
tick_nohz_cpu_exit_qs();
}
@@ -1031,6 +1035,7 @@ void cpuset_exit_nohz_interrupt(void *unused)
{
struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched);
+ trace_printk("IPI: Nohz exit\n");
if (ts->tick_stopped && !is_idle_task(current))
tick_nohz_restart_adaptive();
}
@@ -1052,6 +1057,7 @@ void tick_nohz_pre_schedule(void)
if (test_thread_flag(TIF_NOHZ)) {
tick_nohz_flush_current_times(true);
clear_thread_flag(TIF_NOHZ);
+ trace_printk("clear TIF_NOHZ\n");
/* FIXME: warn if we are in RCU idle mode */
}
}
@@ -1147,6 +1153,7 @@ static enum hrtimer_restart tick_sched_timer(struct hrtimer *timer)
}
update_process_times(user);
profile_tick(CPU_PROFILING);
+ trace_printk("tick\n");
}
hrtimer_forward(timer, now, tick_period);
--
1.7.10.4
next prev parent reply other threads:[~2012-10-29 20:39 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-29 20:27 [PATCH 00/32] [RFC] nohz/cpuset: Start discussions on nohz CPUs Steven Rostedt
2012-10-29 20:27 ` [PATCH 01/32] nohz: Move nohz load balancer selection into idle logic Steven Rostedt
2012-10-30 8:32 ` Charles Wang
2012-10-30 15:39 ` Steven Rostedt
2012-10-29 20:27 ` [PATCH 02/32] cpuset: Set up interface for nohz flag Steven Rostedt
2012-10-30 17:16 ` Steven Rostedt
2012-10-29 20:27 ` [PATCH 03/32] nohz: Try not to give the timekeeping duty to an adaptive tickless cpu Steven Rostedt
2012-10-30 17:33 ` Steven Rostedt
2012-10-29 20:27 ` [PATCH 04/32] x86: New cpuset nohz irq vector Steven Rostedt
2012-10-30 17:39 ` Steven Rostedt
2012-10-30 23:51 ` Frederic Weisbecker
2012-10-31 0:07 ` Steven Rostedt
2012-10-31 0:45 ` Frederic Weisbecker
2012-10-29 20:27 ` [PATCH 05/32] nohz: Adaptive tick stop and restart on nohz cpuset Steven Rostedt
2012-10-30 18:23 ` Steven Rostedt
2012-10-29 20:27 ` [PATCH 06/32] nohz/cpuset: Dont turn off the tick if rcu needs it Steven Rostedt
2012-10-30 18:30 ` Steven Rostedt
2012-10-29 20:27 ` [PATCH 07/32] nohz/cpuset: Wake up adaptive nohz CPU when a timer gets enqueued Steven Rostedt
2012-10-29 20:27 ` [PATCH 08/32] nohz/cpuset: Dont stop the tick if posix cpu timers are running Steven Rostedt
2012-10-29 20:27 ` [PATCH 09/32] nohz/cpuset: Restart tick when nohz flag is cleared on cpuset Steven Rostedt
2012-10-30 18:55 ` Steven Rostedt
2012-10-29 20:27 ` [PATCH 10/32] nohz/cpuset: Restart the tick if printk needs it Steven Rostedt
2012-10-30 19:01 ` Steven Rostedt
2012-10-30 23:54 ` Frederic Weisbecker
2012-10-29 20:27 ` [PATCH 11/32] rcu: Restart the tick on non-responding adaptive nohz CPUs Steven Rostedt
2012-10-29 20:27 ` [PATCH 12/32] rcu: Restart tick if we enqueue a callback in a nohz/cpuset CPU Steven Rostedt
2012-10-29 20:27 ` [PATCH 13/32] nohz: Generalize tickless cpu time accounting Steven Rostedt
2012-10-29 20:27 ` [PATCH 14/32] nohz/cpuset: Account user and system times in adaptive nohz mode Steven Rostedt
2012-10-29 20:27 ` [PATCH 15/32] nohz/cpuset: New API to flush cputimes on nohz cpusets Steven Rostedt
2012-10-29 20:27 ` [PATCH 16/32] nohz/cpuset: Flush cputime on threads in nohz cpusets when waiting leader Steven Rostedt
2012-10-29 20:27 ` [PATCH 17/32] nohz/cpuset: Flush cputimes on procfs stat file read Steven Rostedt
2012-10-29 20:27 ` [PATCH 18/32] nohz/cpuset: Flush cputimes for getrusage() and times() syscalls Steven Rostedt
2012-10-29 20:27 ` [PATCH 19/32] x86: Syscall hooks for nohz cpusets Steven Rostedt
2012-10-29 20:27 ` [PATCH 20/32] nohz/cpuset: enable addition&removal of cpus while in adaptive nohz mode Steven Rostedt
2012-10-29 20:27 ` [PATCH 21/32] nohz: Dont restart the tick before scheduling to idle Steven Rostedt
2012-10-29 20:27 ` [PATCH 22/32] sched: Comment on rq->clock correctness in ttwu_do_wakeup() in nohz Steven Rostedt
2012-10-29 20:27 ` [PATCH 23/32] sched: Update rq clock on nohz CPU before migrating tasks Steven Rostedt
2012-10-29 20:27 ` [PATCH 24/32] sched: Update rq clock on nohz CPU before setting fair group shares Steven Rostedt
2012-10-29 20:27 ` [PATCH 25/32] sched: Update rq clock on tickless CPUs before calling check_preempt_curr() Steven Rostedt
2012-10-29 20:27 ` [PATCH 26/32] sched: Update rq clock earlier in unthrottle_cfs_rq Steven Rostedt
2012-10-29 20:27 ` [PATCH 27/32] sched: Update clock of nohz busiest rq before balancing Steven Rostedt
2012-10-29 20:27 ` [PATCH 28/32] sched: Update rq clock before idle balancing Steven Rostedt
2012-10-29 20:27 ` [PATCH 29/32] sched: Update nohz rq clock before searching busiest group on load balancing Steven Rostedt
2012-10-29 20:27 ` [PATCH 30/32] rcu: Switch to extended quiescent state in userspace from nohz cpuset Steven Rostedt
2012-10-29 20:27 ` [PATCH 31/32] nohz/cpuset: Disable under some configs Steven Rostedt
2012-10-29 20:27 ` Steven Rostedt [this message]
2012-10-30 14:02 ` [PATCH 00/32] [RFC] nohz/cpuset: Start discussions on nohz CPUs Gilad Ben-Yossef
2012-11-02 14:23 ` Christoph Lameter
2012-11-02 14:37 ` Steven Rostedt
2012-11-02 14:50 ` David Nyström
2012-11-02 15:03 ` Christoph Lameter
2012-11-02 15:14 ` Steven Rostedt
2012-11-02 18:35 ` Paul E. McKenney
2012-11-02 20:16 ` Christoph Lameter
2012-11-02 20:41 ` Paul E. McKenney
2012-11-02 20:51 ` Steven Rostedt
2012-11-03 2:08 ` Paul E. McKenney
2012-11-05 15:17 ` Christoph Lameter
2012-11-05 22:41 ` Frederic Weisbecker
2012-11-05 22:32 ` Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121029203851.331629432@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=clark.williams@gmail.com \
--cc=efault@gmx.de \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome