Subject: Re: [RFC 1/3] powerpc: __copy_tofrom_user tweaked for Cell

From: Sanjay Patel <[email-masked]>
Date: Fri, 20 Jun 2008 16:44:55 -0700 (PDT)

--- On Fri, 6/20/08, Benjamin Herrenschmidt <[email-masked]> wrote:
> I though OS X had a trick with a CR bit that would disable
> the dcbz optimization on the first alignment fault ? Or did they
> totally remove it ?

Ah, it's coming back to me. :)

Apple added 'dcbz', removed it, and then there was the clever trick of optimizing the code path with a boot-time perf test and/or changing the code on the first fault...I'm not sure what's implemented in the recent builds.

If Linux can do something similar, that should allow good perf on cacheable and cache-inhibited space as well as different CPUs (eg, if 'dcba' is available, then you don't need the alignment fault hack).

--Sanjay