From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frederic Weisbecker Date: Fri, 28 Jan 2011 17:54:14 +0000 Subject: Re: [PATCH 2/2] tracing, perf : add cpu hotplug trace events Message-Id: <20110128175410.GB1761@nowhere> List-Id: References: <20110126173241.GD1757@nowhere> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Vincent Guittot Cc: linux-kernel@vger.kernel.org, linux-hotplug@vger.kernel.org, rostedt@goodmis.org, amit.kucheria@linaro.org On Thu, Jan 27, 2011 at 11:04:09AM +0100, Vincent Guittot wrote: > On 26 January 2011 18:32, Frederic Weisbecker wrote: > > On Tue, Jan 25, 2011 at 09:54:59AM +0100, Vincent Guittot wrote: > >> Please find below a new proposal for adding trace events for cpu hotpl= ug. > >> The goal is to measure the latency of each part (kernel, architecture) > >> and also to trace the cpu hotplug activity with other power events. I > >> have tested these traces events on an arm platform. > >> > >> Subject: [PATCH 1/2] add cpu hotplug tracepoints > >> > >> this patch adds new events for cpu hotplug tracing > >> =A0* plug/unplug sequence > >> =A0* core and architecture latency measurements > >> > >> Signed-off-by: Vincent Guittot > >> --- > >> =A0kernel/cpu.c | =A0 17 +++++++++++++++++ > >> =A01 files changed, 17 insertions(+), 0 deletions(-) > >> > >> diff --git a/kernel/cpu.c b/kernel/cpu.c > >> index 156cc55..f04e9cf 100644 > >> --- a/kernel/cpu.c > >> +++ b/kernel/cpu.c > >> @@ -16,6 +16,9 @@ > >> =A0#include > >> =A0#include > >> > >> +#define CREATE_TRACE_POINTS > >> +#include > >> + > >> =A0#ifdef CONFIG_SMP > >> =A0/* Serializes the updates to cpu_online_mask, cpu_present_mask */ > >> =A0static DEFINE_MUTEX(cpu_add_remove_lock); > >> @@ -200,7 +203,9 @@ static int __ref take_cpu_down(void *_param) > >> =A0 =A0 =A0 int err; > >> > >> =A0 =A0 =A0 /* Ensure this CPU doesn't handle any more interrupts. */ > >> + =A0 =A0 trace_cpu_hotplug_arch_disable_start((unsigned int)(param->h= cpu)); > >> =A0 =A0 =A0 err =3D __cpu_disable(); > >> + =A0 =A0 trace_cpu_hotplug_arch_disable_end((unsigned int)(param->hcp= u)); > > > > You should create a cpu var instead of doing that not very beautiful ca= st > > twice. > > >=20 > OK >=20 > > Probably we should eventually rename arch_disable into just disable. > > > > And same for die, because otherwise the name is quite long. > > >=20 > If we remove the arch extension of these names, we will have > trace_cpu_hotplug_arch_up for __cpu_up (trace_cpu_hotplug_up is > already used) and trace_cpu_hotplug_disable for __cpu_disable. would > that be acceptable ? You're right. Well, we could rename cpu_hotplug_arch_up into cpu_hotplug_enable, but the overall result makes it confusing. Let's keep it that way.