From: Peter Zijlstra <peterz@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>,
mingo@elte.hu, jens.axboe@oracle.com, nickpiggin@yahoo.com.au,
rusty@rustcorp.com.au, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3 -mm] generic-ipi: fix the race between generic_smp_call_function_*() and hotplug_cfd()
Date: Thu, 30 Jul 2009 08:50:57 +0200 [thread overview]
Message-ID: <1248936657.6987.3095.camel@twins> (raw)
In-Reply-To: <20090729163120.2e27be41.akpm@linux-foundation.org>
On Wed, 2009-07-29 at 16:31 -0700, Andrew Morton wrote:
> -void generic_smp_call_function_interrupt(void)
> +static void
> +__generic_smp_call_function_interrupt(int cpu, int run_callbacks)
> {
> struct call_function_data *data;
> - int cpu = smp_processor_id();
>
> /*
> * Ensure entry is visible on call_function_queue after we have
> @@ -169,12 +165,18 @@ void generic_smp_call_function_interrupt
> +static void
> +__generic_smp_call_function_single_interrupt(int cpu, int run_callbacks)
> {
> - struct call_single_queue *q = &__get_cpu_var(call_single_queue);
> + struct call_single_queue *q = &per_cpu(call_single_queue, cpu);
> unsigned int data_flags;
> LIST_HEAD(list);
>
It introduces this run_callbacks thing to two functions, but nothing
actually uses that... makes me suspicious there's something missing.
> case CPU_DEAD_FROZEN:
> + local_irq_save(flags);
> + __generic_smp_call_function_interrupt(cpu, 0);
> + __generic_smp_call_function_single_interrupt(cpu, 0);
> + local_irq_restore(flags);
Doing the callbacks from a different cpu than they were queued on seems
like a fine way to mess things up.
next prev parent reply other threads:[~2009-07-30 6:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-24 9:50 [PATCH] generic-ipi: make struct call_function_data lockless Xiao Guangrong
2009-07-27 22:00 ` Andrew Morton
2009-07-29 7:08 ` Jens Axboe
2009-07-29 7:53 ` [PATCH 1/3 -mm] generic-ipi: fix hotplug_cfd() Xiao Guangrong
2009-07-29 7:55 ` [PATCH 2/3 -mm] generic-ipi: cleanup for generic_smp_call_function_interrupt() Xiao Guangrong
2009-07-29 7:57 ` [PATCH 3/3 -mm] generic-ipi: fix the race between generic_smp_call_function_*() and hotplug_cfd() Xiao Guangrong
2009-07-29 23:31 ` Andrew Morton
2009-07-30 3:31 ` Xiao Guangrong
2009-07-30 6:50 ` Peter Zijlstra [this message]
2009-07-30 8:11 ` Xiao Guangrong
2009-07-30 8:23 ` Li Zefan
2009-07-29 23:27 ` [PATCH 1/3 -mm] generic-ipi: fix hotplug_cfd() Andrew Morton
2009-07-30 1:18 ` Li Zefan
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=1248936657.6987.3095.camel@twins \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
--cc=rusty@rustcorp.com.au \
--cc=xiaoguangrong@cn.fujitsu.com \
/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