[Cbe-oss-dev] GCC inline memcpy() from local store causes bad page fault

Segher Boessenkool segher at kernel.crashing.org
Thu Mar 22 06:28:29 EST 2007


>> For userland, we could fix all these by having the kernel
>> emulate the insns.  Or compile the few affected userland
>> apps/libs with the right compiler flags (which means adding
>> a flag to disable lha/lwa generation).  Or both.  Which
>> solution is preferred?
>
> For the performance reasons, we should disable lha/lwa for the Cell as
> they are microcoded.

Are ucoded insns really _that_ bad on CBE?  You certainly
should keep lha/lwa with -Os btw.

> But people don't always compile their code specifically
> tuned for the Cell so you get some generic code which means they also 
> should
> be emulated in the kernel.

Well we're only talking about some very specific apps/libraries
here so that doesn't automatically follow.

OTOH, the current kernel code will try to emulate the lha/lwa
CI access by accessing per byte -- which is a very bad plan.

> I think it would also be nice to be able to track when the alignment
> exception is called
> for user land, some kind of verbose output from exception handler so I
> might be able to
> better tune GCC.

Use a local patch for that, or some kprobe thing or whatever :-)


Segher




More information about the cbe-oss-dev mailing list