Re: The Kommunity vs. Dick Johnson

Richard B. Johnson (root@chaos.analogic.com)
Tue, 17 Nov 1998 11:08:18 -0500 (EST)


This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.

---1295196120-486527130-911318898=:1739
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Tue, 17 Nov 1998, Erik Corry wrote:

> Marc Lehmann <pcg@goof.com> wrote:
> > Actually, I get:
>
> > Change : 1.86 times faster
>
> > with -O6 (pgcc), and
>
> > Change : 0.54 times faster
>
> Marc P-II 333 pgcc -O2 1.86 times faster
> Marc P-II 333 pgcc -O6 -funroll-all-loops 0.54 times faster
> Erik PPro 180 gcc-2.7.2.3 -O2 13149 2.5 times faster
> Erik PPro 180 gcc-2.7.2.3 -O6 13261 2.5 times faster
> Erik PPro 180 gcc-2.7.2.3 -O6 -funroll-all-loops 14125 1.45 times faster
>
> Using the i386 checksum code from 2.0.34/2.1.107 instead of the
> C code:
>
> Erik PPro 180 gcc-2.7.2.3 -O2 13354 1.29 times faster
> Erik PPro 180 gcc-2.7.2.3 -O6 -funroll-all-loops 14778 0.08 times faster
>
> (You can get the code for this from
> http://www.image.dk/~ehcorry/linux/chksum.c It slots into
> the files Richard distributed.)
>
> I conclude that -funroll-all-loops is ruining the test,
> probably optimising the timing loop out of existence.
> Either that, or it is unrolling a loop inside an inline
> asm statement, which I don't believe.
>
> Also, on a PPro, Richard's code is probably 1.29 times
> faster than what we already have.
>
> This whole discussion has been a little unfocused.
> Richard seems to think he is up against people who don't
> like assembler, but the real kernel developers have
> nothing against assembler in places where it is useful.
> The proof is that the routine he chose as an example
> is already written in assembler on most architectures.
> This seems to have been missed by most of the people who
> have attacked Richard.
>
> Now that Richard has proven that he is a good assembler
> hacker, it would be nice if he (or someone else) made
> a patch, so we all got more out of it than a warm glow
> by proxy. Of course one will have to adapt his code so
> it does partial checksums of fragments and also does the
> copy-and-checksum tricks, and it remains to be seen whether
> the benefits are still visible in real usage (or at least
> in lmbench) and on x86 processors that are non-Intel
>

I have such a procedure running on my four systems here. I have not
made a patch because I don't want to "fix" something that is not
broken.

However, for those so inclined, if you comment out the two partial
checksum routines with #if 0, and add the 'fastchk.S' to the Makefile,
you can play. This is in ../linux/arch/i386/lib

A major advantage is that it gets rid of the inline asm and makes
a clean ASM file. This means that versions of the 'C' compiler that
break register usage in inline asm won't mess it up.

I have not done anything about the copy and checksum procedure, only
the partial checksum.

The zipped file is included here.

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.1.127 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

---1295196120-486527130-911318898=:1739
Content-Type: APPLICATION/octet-stream; name="fastchk.gz"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.3.95.981117110818.1739B@chaos.analogic.com>
Content-Description:

H4sIAAG9UDYAA6XdW2/bRhrG8WvyUwyQGkgAR5hz5ACLosk23XbTNMgBRfZm
QVFjm4lEqiQVO77Yz77vkIqldBe9+QdFEEkczvvMif1d8UH5oHjZtPtb1dwu
o9o1u7Rp2qTq61R/GvZb1Xf7Ub5YqDfpqhnG1A8qVbfnKtXyV9WupX1a36qq
T2qdhrHvvqT1Qr27bga1H9Kgxuuk5g7qrv2c2rHpWtVdqrYbpel+aNorVanL
vtomteuaVnpQD9Nq92hRPpALphvdNJvNsaJKjV92TV1t1K6qP6VRNXJDKflr
7Wv5fhjm5r/3zTimVq2+qDdNfV31a/VsoX7prtuhaxfqebf70jdX1+PD+pEy
FxdLtW/XUsBPr19K8zLfQqm3o3QjJV8OaRzUZddP95+6yVVPQ/Lw5lp6SSsZ
xkEN1Wf5VWLm7ENu/Uju9Oz9ixc/vlF/U8vy2fPf3r96J/80tvzt5d+f/+Of
+d+xLN/+/K8flZIP+napdVkuxnQ7lourTbfaFLWE/7f0OTbVplxUm+aqLZZl
efr107LY7YfrTXEmpRRF8UBd1bXq0x/7pp/mQqpbpbn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jX
Af864F8H/OuAfx3wrwP+dcC/DvjXAf864F8H/OuAfx3wrwP+dcC/DvjXAf86
4F8H/GuBfy3wrwX+tcC/FvjXAv9a4F8L/GuBfy3wrwX+tcC/FvjXAv9a4F8L
/GuBfy3wrwX+tcC/FvjXAv9a4F8L/GuBfy3wrwX+tcC/FvjXAv9a4F8L/GuB
fy3wrwX+tcC/FvjXAv9a4F8L/GuBfy3wrwX+tcC/FvjXAv9a4F8L/GuBfy3w
rwX+tcC/FvjXAv9a4F8L/GuBfy3wrwX+tcC/FvjXAv9a4F8L/GuAfw3wrwH+
NcC/BvjXAP8a4F8D/GuAfw3wrwH+NcC/BvjXAP8a4F8D/GuAfw3wrwH+NcC/
BvjXAP8a4F8D/GuAfw3wrwH+NcC/BvjXAP8a4F8D/GuAfw3wrwH+NcC/BvjX
AP8a4F8D/GuAfw3wrwH+NcC/BvjXAP8a4F8D/GuAfw3wrwH+NcC/BvjXAP8a
4F8D/GuAfw3wrwH+NcC/BvjXAP8a4F8D/KuBfzXwrwb+1cC/GvhXA/9q4F8N
/KuBfzXwrwb+1cC/GvhXA/9q4F8N/KuBfzXwrwb+1cC/GvhXA/9q4F8N/KuB
fzXwrwb+1cC/GvhXA/9q4F8N/KuBfzXwrwb+1cC/GvhXA/9q4F8N/KuBfzXw
rwb+1cC/GvhXA/9q4F8N/KuBfzXwrwb+1cC/GvhXA/9q4F8N/KuBfzXwrwb+
1cC/GvhXA/9q4N9vL/5/bfNLnJ/+71vA71+7nX/PrwPP73DO72KeXn5cLvKL
zMv/ArZmXIqwgAAA
---1295196120-486527130-911318898=:1739--

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