From: Dave Jones <davej@redhat.com>
To: akpm@linux-foundation.org
Cc: lenb@kernel.org, linux-acpi@vger.kernel.org, efault@gmx.de,
jaswinder@kernel.org, len.brown@intel.com, mingo@elte.hu,
rusty@rustcorp.com.au, tglx@linutronix.de,
venkatesh.pallipadi@intel.com, yakui.zhao@intel.com,
yanmin_zhang@linux.intel.com
Subject: Re: [patch 2/8] arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c: avoid cross-CPU interrupts by using smp_call_function_any()
Date: Fri, 18 Sep 2009 15:59:53 -0400 [thread overview]
Message-ID: <20090918195953.GB7413@redhat.com> (raw)
In-Reply-To: <200909181941.n8IJf5oR002397@imap1.linux-foundation.org>
On Fri, Sep 18, 2009 at 12:41:05PM -0700, Andrew Morton wrote:
> diff -puN arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c~arch-x86-kernel-cpu-cpufreq-acpi-cpufreqc-avoid-cross-cpu-interrupts-by-using-smp_call_function_any arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
> --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c~arch-x86-kernel-cpu-cpufreq-acpi-cpufreqc-avoid-cross-cpu-interrupts-by-using-smp_call_function_any
> +++ a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
> @@ -192,9 +192,11 @@ static void do_drv_write(void *_cmd)
>
> static void drv_read(struct drv_cmd *cmd)
> {
> + int err;
> cmd->val = 0;
>
> - smp_call_function_single(cpumask_any(cmd->mask), do_drv_read, cmd, 1);
> + err = smp_call_function_any(cmd->mask, do_drv_read, cmd, 1);
> + WARN_ON_ONCE(err); /* smp_call_function_any() was buggy? */
> }
>
> static void drv_write(struct drv_cmd *cmd)
I'm ok with this going in, but I still wonder if we could have done it
all a lot easier, by making cpumask_any pick the current cpu if it was
in the mask instead of introducing yet another variant to an already
enormous api.
Dave
next prev parent reply other threads:[~2009-09-18 20:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-18 19:41 [patch 2/8] arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c: avoid cross-CPU interrupts by using smp_call_function_any() akpm
2009-09-18 19:59 ` Dave Jones [this message]
2009-09-18 20:11 ` Andrew Morton
2009-09-22 7:17 ` Rusty Russell
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=20090918195953.GB7413@redhat.com \
--to=davej@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=efault@gmx.de \
--cc=jaswinder@kernel.org \
--cc=len.brown@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
--cc=venkatesh.pallipadi@intel.com \
--cc=yakui.zhao@intel.com \
--cc=yanmin_zhang@linux.intel.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