Re: [RFC Patch]Use ar.kr2 for smp_processor_id

From: Keith Owens <>
Date: 2007-02-09 10:59:00
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

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

Maybe.  Implement it, time it and see which is faster.


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 !=

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Fri Feb 09 11:48:18 2007

This archive was generated by hypermail 2.1.8 : 2007-02-09 11:48:35 EST