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

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

From: Richard Henderson <hidden>
Date: 2006-05-10 15:47:38
Also in: linux-arch, lkml

On Wed, May 10, 2006 at 02:03:59PM +1000, Paul Mackerras wrote:
With this patch, 64-bit powerpc uses __thread for per-cpu variables.
How do you plan to address the compiler optimizing

	__thread int foo;
	{
	  use(foo);
	  schedule();
	  use(foo);
	}

into

	{
	  int *tmp = &foo;	// tls arithmetic here
	  use(*tmp);
	  schedule();
	  use(*tmp);
	}

Across the schedule, we may have changed cpus, making the cached
address invalid.


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