]> git.karo-electronics.de Git - mv-sheeva.git/commit
powerpc: Optimise 64bit csum_partial
authorAnton Blanchard <anton@samba.org>
Mon, 2 Aug 2010 20:08:34 +0000 (20:08 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 2 Sep 2010 04:07:29 +0000 (14:07 +1000)
commit9b83ecb0a3cf1bf7ecf84359ddcfb9dd49646bf2
tree5ee6f0184cad6056917fcd9ecc4bfd479f7710c8
parent93f68f1ef787d97ab688f78a01f446e85bb9a496
powerpc: Optimise 64bit csum_partial

The main loop of csum_partial runs very slowly on recent POWER CPUs. After some
analysis on both POWER6 and POWER7 I came up with routine below. First we get
the source aligned to a double word, ignoring any odd alignment to keep things
simple. Then we do 64 bytes at a time, with an entry and exit limb of a further
64 bytes. On both POWER6 and POWER7 this should be as fast as we can go since
we are limited by the latency of the adde instructions.

To test this I forced checksumming on over loopback and ran socklib (a
simple TCP benchmark). On a POWER6 575 throughput improved by 11% with
this patch.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/lib/checksum_64.S