Re: Kernel checksum routime (>=5)x86 optimization

Ingo Molnar (mingo@chiara.csoma.elte.hu)
Sun, 16 May 1999 00:20:53 +0200 (CEST)


On Fri, 14 May 1999, Montressor wrote:

> In the arch/i386/lib/checksum.S file, line 156:
>
> 40:
> addl -128(%esi), %eax
> adcl -124(%esi), %eax
> adcl -120(%esi), %eax
> adcl -116(%esi), %eax
> adcl -112(%esi), %eax
> adcl -108(%esi), %eax
> adcl -104(%esi), %eax
> adcl -100(%esi), %eax
> adcl -96(%esi), %eax
> adcl -92(%esi), %eax
> adcl -88(%esi), %eax
> adcl -84(%esi), %eax
> adcl -80(%esi), %eax
> adcl -76(%esi), %eax
>
> this is, as I understand, a vastly unrolled loop to perfrom the
> checksum. Note that on a dual pipeline machine, the second pipeline does
> not get used at all in this routine. [...]

this is wrong, the PPro and up (for what this routine is optimized) uses
register renaming which makes the above loop as highspeed as it can get.

on a Pentium class CPU you are right, but that one has a different
assembly routine.

-- mingo

-
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/