Messages in this thread | | | Date | Sun, 3 Mar 1996 19:41:48 -0500 | From | Robert L Krawitz <> | Subject | Fast Pentium memcpy() corruption bug appears to be fixed (finally!) |
| |
I believe that I have fixed the corruption problem with my fast memcpy() routine. The fix was to force the routine to read the first word from both the source and destination block with conventional instructions first. I did this in the belief that the problem was due to a page fault at the wrong time (since this only seemed to happen when the machine was under significant load). My guess appears (so far) to be correct. I ran my usual test (two separate cvs diff's of the Linux kernel concurrently) without any failures. I repeated it with 7 concurrent cvs diff's, and had no errors, either.
The patch and information may be found on my Linux web page (http://www.tiac.net/users/rlk/linux.html). Summary Byte benchmarks with and without the patch follow -- the complete results are on that page.
With the patch (1.3.70):
INDEX VALUES TEST BASELINE RESULT INDEX
Arithmetic Test (type = double) 2541.7 16716.9 6.6 Dhrystone 2 without register variables 22366.3 132050.4 5.9 Execl Throughput Test 16.5 788.8 47.8 File Copy (30 seconds) 179.0 5723.0 32.0 Pipe-based Context Switching Test 1318.5 20302.0 15.4 Shell scripts (8 concurrent) 4.0 36.0 9.0 ========= SUM of 6 items 116.7 AVERAGE 19.4
Without the patch (1.3.70 otherwise configured identically):
INDEX VALUES TEST BASELINE RESULT INDEX
Arithmetic Test (type = double) 2541.7 16721.4 6.6 Dhrystone 2 without register variables 22366.3 132044.4 5.9 Execl Throughput Test 16.5 632.4 38.3 File Copy (30 seconds) 179.0 5263.0 29.4 Pipe-based Context Switching Test 1318.5 19444.4 14.7 Shell scripts (8 concurrent) 4.0 31.0 7.8 ========= SUM of 6 items 102.7 AVERAGE 17.1
-- Robert Krawitz <rlk@tiac.net>
Member of the League for Programming Freedom -- mail lpf@uunet.uu.net Tall Clubs International -- tci-request@think.com or 1-800-521-2512
| |