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=117087180232044&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. - To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |