From: Keith Owens <kaos@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [RFC Patch]Use ar.kr2 for smp_processor_id
Date: Thu, 08 Feb 2007 23:59:00 +0000 [thread overview]
Message-ID: <20719.1170979140@kao2.melbourne.sgi.com> (raw)
In-Reply-To: <1170905324.3230.7.camel@linux-znh>
Zou Nan hai (on 08 Feb 2007 15:14:54 +0800) wrote:
> I think using a static value to cache getcpu will heavily bounced on
>that cache line contain the static value if multi cpus calls getcpu very
>frequently.
AFAICT, Tony's suggestion[*] is all in user space, e.g. glibc. Each
application will get its own thread local copy of the static variable,
there is no globally shared static value so no cache line bouncing.
> then implement current_thread_info()->cpu in fsys call should be
>better?
Maybe. Implement it, time it and see which is faster.
[*] http://marc.theaimsgroup.com/?l=linux-ia64&m\x117087180232044&w=2
BTW Tony, in that code there is no need to initialise cpu to ~0 nor to
test for that value. On the first call it is guaranteed that ar.k3 !save_ar_k3.
prev parent reply other threads:[~2007-02-08 23:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-08 3:28 [RFC Patch]Use ar.kr2 for smp_processor_id Zou Nan hai
2007-02-08 4:27 ` Zou Nan hai
2007-02-08 4:59 ` Zou Nan hai
2007-02-08 5:11 ` Zou Nan hai
2007-02-08 6:04 ` Keith Owens
2007-02-08 6:37 ` Keith Owens
2007-02-08 6:55 ` Keith Owens
2007-02-08 7:14 ` Zou Nan hai
2007-02-08 7:38 ` Zou Nan hai
2007-02-08 8:28 ` peterc
2007-02-08 8:40 ` Keith Owens
2007-02-08 18:03 ` Luck, Tony
2007-02-08 23:59 ` Keith Owens [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=20719.1170979140@kao2.melbourne.sgi.com \
--to=kaos@sgi.com \
--cc=linux-ia64@vger.kernel.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