All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@codemonkey.org.uk>
To: Zwane Mwaikambo <zwane@arm.linux.org.uk>
Cc: Herbert Xu <herbert@gondor.apana.org.au>, linux-kernel@vger.kernel.org
Subject: Re: To make a function get executed on cpu2
Date: Wed, 2 Jul 2003 13:21:37 +0100	[thread overview]
Message-ID: <20030702122137.GA7562@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.53.0307020758001.13565@montezuma.mastecende.com>

On Wed, Jul 02, 2003 at 08:02:19AM -0400, Zwane Mwaikambo wrote:
 > On Wed, 2 Jul 2003, Herbert Xu wrote:
 > 
 > > Surely you can emulate it using smp_call_function and make it return
 > > straight away if it runs on the wrong CPU.
 > 
 > Yes you can, i thought about the same thing, but it simply generates 
 > unecessary APIC bus traffic and just sounds horrid. Not to mention it 
 > doesn't sound all that friendly on larger systems.

See do_cpuid in arch/i386/kernel/cpuid.c for an example of how to do this
properly. It's a bit icky, but works. I've considered writing a generic
run_on_cpu() when I did the on_each_cpu() stuff, but asides from
cpuid.c, msr.c was the only other case I could find from a quick
grep around that really cared, so it didn't seem worth the effort.

		Dave


  reply	other threads:[~2003-07-02 12:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-01  6:20 To make a function get executed on cpu2 Raghava Raju
2003-07-01 16:33 ` Zwane Mwaikambo
2003-07-02 10:03   ` Herbert Xu
2003-07-02 12:02     ` Zwane Mwaikambo
2003-07-02 12:21       ` Dave Jones [this message]
2003-07-02 12:29         ` Zwane Mwaikambo

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=20030702122137.GA7562@suse.de \
    --to=davej@codemonkey.org.uk \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zwane@arm.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.