PATCH: checksum optimization on semi-686's

Alex K. (kolex@erols.com)
Sun, 16 May 1999 01:51:54 -0400


This is a multi-part message in MIME format.
--------------0F833BDF9BF90B0FFEBEC778
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

OK, here's my patch that should optimize checksumming on my Cyrix
6x86MX. I ran the code in a test program, and it gave me 50% more speed
for the actual summation. Someone told me, tho, that this patch won't
benefit newer 686's. See my earlier posting on the topic.
The patch was made from a 2.2.8 kernel, but I don't think checksum.S has
changed since then anyways.

--------------0F833BDF9BF90B0FFEBEC778
Content-Type: text/plain; charset=us-ascii;
name="chksumpatch.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="chksumpatch.patch"

diff -urB oldlinux/arch/i386/lib/checksum.S linux/arch/i386/lib/checksum.S
--- oldlinux/arch/i386/lib/checksum.S Sun May 16 01:41:03 1999
+++ linux/arch/i386/lib/checksum.S Fri May 14 16:50:53 1999
@@ -154,38 +154,41 @@
jmp 80f

40:
+ pushl %ebx
addl -128(%esi), %eax
- adcl -124(%esi), %eax
+ adcl -124(%esi), %ebx
adcl -120(%esi), %eax
- adcl -116(%esi), %eax
+ adcl -116(%esi), %ebx
adcl -112(%esi), %eax
- adcl -108(%esi), %eax
+ adcl -108(%esi), %ebx
adcl -104(%esi), %eax
- adcl -100(%esi), %eax
+ adcl -100(%esi), %ebx
adcl -96(%esi), %eax
- adcl -92(%esi), %eax
+ adcl -92(%esi), %ebx
adcl -88(%esi), %eax
- adcl -84(%esi), %eax
+ adcl -84(%esi), %ebx
adcl -80(%esi), %eax
- adcl -76(%esi), %eax
+ adcl -76(%esi), %ebx
adcl -72(%esi), %eax
- adcl -68(%esi), %eax
+ adcl -68(%esi), %ebx
adcl -64(%esi), %eax
- adcl -60(%esi), %eax
+ adcl -60(%esi), %ebx
adcl -56(%esi), %eax
- adcl -52(%esi), %eax
+ adcl -52(%esi), %ebx
adcl -48(%esi), %eax
- adcl -44(%esi), %eax
+ adcl -44(%esi), %ebx
adcl -40(%esi), %eax
- adcl -36(%esi), %eax
+ adcl -36(%esi), %ebx
adcl -32(%esi), %eax
- adcl -28(%esi), %eax
+ adcl -28(%esi), %ebx
adcl -24(%esi), %eax
- adcl -20(%esi), %eax
+ adcl -20(%esi), %ebx
adcl -16(%esi), %eax
- adcl -12(%esi), %eax
+ adcl -12(%esi), %ebx
adcl -8(%esi), %eax
- adcl -4(%esi), %eax
+ adcl -4(%esi), %ebx
+ adcl %ebx,%eax
+ popl %ebx
45:
lea 128(%esi), %esi
adcl $0, %eax

--------------0F833BDF9BF90B0FFEBEC778--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/