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

From: Sanjay Patel <[email-masked]>
Date: Fri, 20 Jun 2008 10:46:36 -0700 (PDT)

--- On Fri, 6/20/08, Gunnar von Boehn <[email-masked]> wrote:
> How important is best performance for the unaligned copy
> to/from uncacheable memory?
> The challenge of the CELL chip is that X-form of the shift
> instructions are microcoded.
> The shifts are needed to implement a copy that reads and
> writes always aligned.

Hi Gunnar,

I have no idea how important unaligned or uncacheable copy perf is for Cell Linux. My experience is from Mac OS X for PPC, where we used dcbz in a general-purpose memcpy but were forced to pull that optimization because of the detrimental perf effect on important applications.

I may be missing something, but I don't see how Cell's microcoded shift is much of a factor here. The problem is that the dcbz will generate the alignment exception regardless of whether the data is actually unaligned or not. Once you're on that code path, performance can't be good, can it?

--Sanjay