Re: broken local_t on i386

Andi Kleen
2006-06-12T18:35:42Z

On Monday 12 June 2006 20:27, Christoph Lameter wrote:
> On Mon, 12 Jun 2006, Andi Kleen wrote:
> > It does, but the per cpu data that everybody uses doesn't reside in the
> > PDA because it wasn't possible to make this work with binutils
> >
> > It would require a relocation relative to another symbol which isn't
> > really supported.
>
> I dont think you need a relocation relative to another symbol. Map the
> pda to a virtual adress range. That is then translated with a
> processor specific page table to various physical addresses.

Per processor page tables are not really practical on x86-64. They would
get really messy because you would need to duplicate the top level
of the page tables per CPU.

>
> > At some point I considered using runtime patching to work around
> > this limitation, but it would be some work and relatively complex.
>
> Well this would drastically decreased the overhead for PDA access and fix
> local.t

Saving two instructions? And PDA is usually in L1. I doubt you could benchmark
a difference.

-Andi