[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20101028001257.GZ5969@erda.amd.com>
Date: Thu, 28 Oct 2010 02:12:57 +0200
From: Robert Richter <robert.richter@....com>
To: Santosh Shilimkar <santosh.shilimkar@...com>
CC: "oprofile-list@...ts.sf.net" <oprofile-list@...ts.sf.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
sricharan <r.sricharan@...com>
Subject: Re: [PATCH v2] oprofile: Fix the hang while offline the cpu
On 27.10.10 11:17:15, Santosh Shilimkar wrote:
> The kernel build with CONFIG_OPROFILE and CPU_HOTPLUG enabled.
> The oprofile is initialised using system timer in absence of hardware
> counters supports. Oprofile isn't started from userland.
>
> In this setup while doing a CPU offline the kernel hangs in infinite
> for loop inside lock_hrtimer_base() function
>
> This happens because as part of oprofile_cpu_notify(, it tries to
> stop an hrtimer which was never started. These per-cpu hrtimers
> are started when the oprfile is started.
> echo 1 > /dev/oprofile/enable
>
> This problem also existwhen the cpu is booted with maxcpus parameter
> set. When bringing the remaining cpus online the timers are started
> even if oprofile is not yet enabled.
>
> This patch fix this issue by adding a state variable so that
> these hrtimer start/stop is only attempted when oprofile is
> started
>
> Reported-by: Jan Sebastien <s-jan@...com>
> Signed-off-by: sricharan <r.sricharan@...com>
> Tested-by: sricharan <r.sricharan@...com>
> Cc: Robert Richter <robert.richter@....com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@...com>
> ---
> V2: Updated patch with comments from Robert Richter
> drivers/oprofile/timer_int.c | 13 +++++++++++++
> 1 files changed, 13 insertions(+), 0 deletions(-)
Applied to oprofile/urgent, thanks Santosh.
-Robert
--
Advanced Micro Devices, Inc.
Operating System Research Center
--
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