Thread (25 messages) flat view 25 messages, 9 authors, 2006-05-18

Re: [RFC/PATCH] Make powerpc64 use __thread for per-cpu variables

From: Segher Boessenkool <hidden>
Date: 2006-05-10 23:17:58
Also in: linux-arch, lkml

quoted
quoted
How do you plan to address the compiler optimizing
 ...
quoted
Across the schedule, we may have changed cpus, making the cached
address invalid.
Per-cpu variables need to be accessed only with preemption
disabled.  And the preemption enable/disable operations
provide a compiler memory barrier.
No, Richard has a point, it's not the value that is the concern, it's
the address, which gcc could assume is still valid after a barrier.
Drat.
Would an asm clobber of GPR13 in the schedule routines (or a wrapper
for them, or whatever) work?


Segher
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help