public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: a.p.zijlstra@chello.nl, mingo@kernel.org
Cc: acme@infradead.org, paulus@samba.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] perf, cpu hotplug: Run CPU_STARTING notifiers with irqs disabled
Date: Fri, 05 Oct 2012 16:13:34 +0530	[thread overview]
Message-ID: <506EB9D6.2070000@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120913144220.3426.22392.stgit@srivatsabhat.in.ibm.com>

On 09/13/2012 08:12 PM, Srivatsa S. Bhat wrote:
> The CPU_STARTING notifiers are supposed to be run with irqs disabled. But the
> perf_cpu_notifier() macro invokes them without doing that. Fix it.
> 
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
> ---

Any thoughts on this?

Regards,
Srivatsa S. Bhat

> 
>  include/linux/perf_event.h |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
> index 7602ccb..cc4574d 100644
> --- a/include/linux/perf_event.h
> +++ b/include/linux/perf_event.h
> @@ -1346,10 +1346,13 @@ static inline void perf_event_task_tick(void)				{ }
>  do {									\
>  	static struct notifier_block fn##_nb __cpuinitdata =		\
>  		{ .notifier_call = fn, .priority = CPU_PRI_PERF };	\
> +	unsigned long flags;						\
>  	fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE,			\
>  		(void *)(unsigned long)smp_processor_id());		\
> +	local_irq_save(flags);						\
>  	fn(&fn##_nb, (unsigned long)CPU_STARTING,			\
>  		(void *)(unsigned long)smp_processor_id());		\
> +	local_irq_restore(flags);					\
>  	fn(&fn##_nb, (unsigned long)CPU_ONLINE,				\
>  		(void *)(unsigned long)smp_processor_id());		\
>  	register_cpu_notifier(&fn##_nb);				\
> 


      parent reply	other threads:[~2012-10-05 10:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-13 14:42 [PATCH 1/2] perf, cpu hotplug: Run CPU_STARTING notifiers with irqs disabled Srivatsa S. Bhat
2012-09-13 14:42 ` [PATCH 2/2] perf, cpu hotplug: Use cached value of smp_processor_id() Srivatsa S. Bhat
2012-10-05 10:43 ` Srivatsa S. Bhat [this message]

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=506EB9D6.2070000@linux.vnet.ibm.com \
    --to=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulus@samba.org \
    /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