linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V6 2/2] tracing, perf: add cpu hotplug trace events
@ 2011-03-01 16:06 Vincent Guittot
  2011-03-02  9:38 ` Thomas Gleixner
  0 siblings, 1 reply; 6+ messages in thread
From: Vincent Guittot @ 2011-03-01 16:06 UTC (permalink / raw)
  To: linux-kernel, linux-hotplug, fweisbec, rostedt, amit.kucheria,
	mingo, rusty, tglx

Trace the cpu state and the time spent in core and arch code

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
---
 kernel/cpu.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 156cc55..8abb84b 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -16,6 +16,9 @@
 #include <linux/mutex.h>
 #include <linux/gfp.h>

+#define CREATE_TRACE_POINTS
+#include <trace/events/cpu_hotplug.h>
+
 #ifdef CONFIG_SMP
 /* Serializes the updates to cpu_online_mask, cpu_present_mask */
 static DEFINE_MUTEX(cpu_add_remove_lock);
@@ -197,10 +200,13 @@ struct take_cpu_down_param {
 static int __ref take_cpu_down(void *_param)
 {
 	struct take_cpu_down_param *param = _param;
+	unsigned int cpu = (unsigned int)(param->hcpu);
 	int err;

 	/* Ensure this CPU doesn't handle any more interrupts. */
+	trace_cpu_hotplug_disable_start(cpu);
 	err = __cpu_disable();
+	trace_cpu_hotplug_disable_end(cpu);
 	if (err < 0)
 		return err;

@@ -256,7 +262,9 @@ static int __ref _cpu_down(unsigned int cpu, int
tasks_frozen)
 		cpu_relax();

 	/* This actually kills the CPU. */
+	trace_cpu_hotplug_die_start(cpu);
 	__cpu_die(cpu);
+	trace_cpu_hotplug_die_end(cpu);

 	/* CPU is completely dead: tell everyone.  Too late to complain. */
 	cpu_notify_nofail(CPU_DEAD | mod, hcpu);
@@ -276,6 +284,8 @@ int __ref cpu_down(unsigned int cpu)

 	cpu_maps_update_begin();

+	trace_cpu_hotplug_down_start(cpu);
+
 	if (cpu_hotplug_disabled) {
 		err = -EBUSY;
 		goto out;
@@ -284,6 +294,8 @@ int __ref cpu_down(unsigned int cpu)
 	err = _cpu_down(cpu, 0);

 out:
+	trace_cpu_hotplug_down_end(cpu);
+
 	cpu_maps_update_done();
 	return err;
 }
@@ -310,7 +322,9 @@ static int __cpuinit _cpu_up(unsigned int cpu, int
tasks_frozen)
 	}

 	/* Arch-specific enabling code. */
+	trace_cpu_hotplug_arch_up_start(cpu);
 	ret = __cpu_up(cpu);
+	trace_cpu_hotplug_arch_up_end(cpu);
 	if (ret != 0)
 		goto out_notify;
 	BUG_ON(!cpu_online(cpu));
@@ -369,6 +383,8 @@ int __cpuinit cpu_up(unsigned int cpu)

 	cpu_maps_update_begin();

+	trace_cpu_hotplug_up_start(cpu);
+
 	if (cpu_hotplug_disabled) {
 		err = -EBUSY;
 		goto out;
@@ -377,6 +393,8 @@ int __cpuinit cpu_up(unsigned int cpu)
 	err = _cpu_up(cpu, 0);

 out:
+	trace_cpu_hotplug_up_end(cpu);
+
 	cpu_maps_update_done();
 	return err;
 }
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH V6 2/2] tracing, perf: add cpu hotplug trace events
  2011-03-01 16:06 [PATCH V6 2/2] tracing, perf: add cpu hotplug trace events Vincent Guittot
@ 2011-03-02  9:38 ` Thomas Gleixner
  2011-03-02  9:50   ` Vincent Guittot
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Gleixner @ 2011-03-02  9:38 UTC (permalink / raw)
  To: Vincent Guittot
  Cc: linux-kernel, linux-hotplug, fweisbec, rostedt, amit.kucheria,
	mingo, rusty

On Tue, 1 Mar 2011, Vincent Guittot wrote:

> Trace the cpu state and the time spent in core and arch code

So you completely ignored my review comments, except for fixing up the
changelog.

	https://lkml.org/lkml/2011/2/24/297

All of the comments in the code still apply and either you fix it or
at least have the courtesy to explain why you think that those
comments do not need to be addressed.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V6 2/2] tracing, perf: add cpu hotplug trace events
  2011-03-02  9:38 ` Thomas Gleixner
@ 2011-03-02  9:50   ` Vincent Guittot
  2011-03-02  9:55     ` Thomas Gleixner
  0 siblings, 1 reply; 6+ messages in thread
From: Vincent Guittot @ 2011-03-02  9:50 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: linux-kernel, linux-hotplug, fweisbec, rostedt, amit.kucheria,
	mingo, rusty

On 2 March 2011 10:38, Thomas Gleixner <tglx@linutronix.de> wrote:
> On Tue, 1 Mar 2011, Vincent Guittot wrote:
>
>> Trace the cpu state and the time spent in core and arch code
>
> So you completely ignored my review comments, except for fixing up the
> changelog.
>
>        https://lkml.org/lkml/2011/2/24/297
>
> All of the comments in the code still apply and either you fix it or
> at least have the courtesy to explain why you think that those
> comments do not need to be addressed.
>

I thought that I have answered to your comments :
https://lkml.org/lkml/2011/2/28/203

Do I miss something ?

Thanks,

Vincent
> Thanks,
>
>        tglx
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V6 2/2] tracing, perf: add cpu hotplug trace events
  2011-03-02  9:50   ` Vincent Guittot
@ 2011-03-02  9:55     ` Thomas Gleixner
  2011-03-02  9:58       ` Ingo Molnar
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Gleixner @ 2011-03-02  9:55 UTC (permalink / raw)
  To: Vincent Guittot
  Cc: linux-kernel, linux-hotplug, fweisbec, rostedt, amit.kucheria,
	mingo, rusty

[-- Attachment #1: Type: TEXT/PLAIN, Size: 833 bytes --]

On Wed, 2 Mar 2011, Vincent Guittot wrote:

> On 2 March 2011 10:38, Thomas Gleixner <tglx@linutronix.de> wrote:
> > On Tue, 1 Mar 2011, Vincent Guittot wrote:
> >
> >> Trace the cpu state and the time spent in core and arch code
> >
> > So you completely ignored my review comments, except for fixing up the
> > changelog.
> >
> >        https://lkml.org/lkml/2011/2/24/297
> >
> > All of the comments in the code still apply and either you fix it or
> > at least have the courtesy to explain why you think that those
> > comments do not need to be addressed.
> >
> 
> I thought that I have answered to your comments :
> https://lkml.org/lkml/2011/2/28/203
> 
> Do I miss something ?

Oops, my bad. I missed that reply somehow. It's not in my inbox. Will
dig into my lkml archive then.

Thanks,

	tglx


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V6 2/2] tracing, perf: add cpu hotplug trace events
  2011-03-02  9:55     ` Thomas Gleixner
@ 2011-03-02  9:58       ` Ingo Molnar
  2011-03-02 16:27         ` Steven Rostedt
  0 siblings, 1 reply; 6+ messages in thread
From: Ingo Molnar @ 2011-03-02  9:58 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Vincent Guittot, linux-kernel, linux-hotplug, fweisbec, rostedt,
	amit.kucheria, rusty


* Thomas Gleixner <tglx@linutronix.de> wrote:

> On Wed, 2 Mar 2011, Vincent Guittot wrote:
> 
> > On 2 March 2011 10:38, Thomas Gleixner <tglx@linutronix.de> wrote:
> > > On Tue, 1 Mar 2011, Vincent Guittot wrote:
> > >
> > >> Trace the cpu state and the time spent in core and arch code
> > >
> > > So you completely ignored my review comments, except for fixing up the
> > > changelog.
> > >
> > >        https://lkml.org/lkml/2011/2/24/297
> > >
> > > All of the comments in the code still apply and either you fix it or
> > > at least have the courtesy to explain why you think that those
> > > comments do not need to be addressed.
> > >
> > 
> > I thought that I have answered to your comments :
> > https://lkml.org/lkml/2011/2/28/203
> > 
> > Do I miss something ?
> 
> Oops, my bad. I missed that reply somehow. It's not in my inbox. Will
> dig into my lkml archive then.

Hm, same here, i only got that reply from lkml, never via direct mail delivery. So 
something ate the straight path of that mail.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V6 2/2] tracing, perf: add cpu hotplug trace events
  2011-03-02  9:58       ` Ingo Molnar
@ 2011-03-02 16:27         ` Steven Rostedt
  0 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2011-03-02 16:27 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Thomas Gleixner, Vincent Guittot, linux-kernel, linux-hotplug,
	fweisbec, amit.kucheria, rusty

On Wed, 2011-03-02 at 10:58 +0100, Ingo Molnar wrote:
> * Thomas Gleixner <tglx@linutronix.de> wrote:

> > > 
> > > I thought that I have answered to your comments :
> > > https://lkml.org/lkml/2011/2/28/203
> > > 
> > > Do I miss something ?
> > 
> > Oops, my bad. I missed that reply somehow. It's not in my inbox. Will
> > dig into my lkml archive then.
> 
> Hm, same here, i only got that reply from lkml, never via direct mail delivery. So 
> something ate the straight path of that mail.

Strange, I got his reply. Perhaps you and Thomas have the same setup
that caused it to be dropped?

-- Steve



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-03-02 16:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-01 16:06 [PATCH V6 2/2] tracing, perf: add cpu hotplug trace events Vincent Guittot
2011-03-02  9:38 ` Thomas Gleixner
2011-03-02  9:50   ` Vincent Guittot
2011-03-02  9:55     ` Thomas Gleixner
2011-03-02  9:58       ` Ingo Molnar
2011-03-02 16:27         ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).