From owner-freebsd-hardware Sun Aug 10 22:34:44 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id WAA13006 for hardware-outgoing; Sun, 10 Aug 1997 22:34:44 -0700 (PDT) Received: from ducky.net (gate.ducky.net [198.145.101.253]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id WAA12992; Sun, 10 Aug 1997 22:34:38 -0700 (PDT) Received: from localhost.ducky.net (localhost.ducky.net [127.0.0.1]) by ducky.net (8.6.12/8.6.12) with SMTP id WAA03574; Sun, 10 Aug 1997 22:34:09 -0700 Message-Id: <199708110534.WAA03574@ducky.net> X-Authentication-Warning: ducky.net: Host localhost.ducky.net didn't use HELO protocol To: dg@root.com cc: freebsd-hackers@FreeBSD.ORG, freebsd-hardware@FreeBSD.ORG, mike@ducky.net Subject: Re: question about "ed" driver performance on ASUS SP3G & 486DX4/100 In-reply-to: Your message of "Sun, 10 Aug 1997 21:33:16 PDT." <199708110433.VAA08541@implode.root.com> Date: Sun, 10 Aug 1997 22:34:09 -0700 From: Mike Haertel Sender: owner-freebsd-hardware@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > It sounds like there is a problem that is special to the Asus SP3G. The >obvious thing to check for is the ISA bus speed being correct. As for the >wd8013, with its shared memory design, it is the fastest ISA ethernet card >that FreeBSD supports. The raw access speed to the shared memory should >be about 4MB/second - plenty fast enough to keep up with 10Mbps ethernet. Hmm... this inspired me to write a small benchmark. This program maps the ethernet board's shared memory (assumed to be at 0xd8000) to user space, and then copies 16 megabytes out of it 32 bits at a time. On the 486 box, it takes about 15.5 seconds. On the Pentium box (which worked for the NFS install) it takes about 14.5 seconds. Either of these is just slightly faster than 1 MB/sec and nowhere near the claimed 4 MB/sec. Perhaps my board is pessimal and the Pentium box, being just a hair faster, is fast enough to keep up? Since both the 486 and the Pentium exhibit (nearly) the same performance, and I am 100% positive that the Pentium is running the ISA bus at the right frequency, I'm fairly sure there is no problem with the ISA bus speed in the 486. (I checked the motherboard docs and it does not appear to be configurable anyway.) --cut here-- /* * usage: time ./a.out */ #include #include asm(" _docopy: pushl %ebx movl 8(%esp), %ecx movl 12(%esp), %edx movl $1024, %eax loopy: movl 0(%edx), %ebx movl %ebx, 0(%ecx) movl 4(%edx), %ebx movl %ebx, 4(%ecx) movl 8(%edx), %ebx movl %ebx, 8(%ecx) movl 12(%edx), %ebx movl %ebx, 12(%ecx) addl $16, %ecx addl $16, %edx decl %eax jne loopy popl %ebx ret "); extern void docopy(short *dst, short *src); main() { int fd, i, j; short *p, d[8192]; fd = open("/dev/mem", O_RDONLY); if (fd < 0) { printf("barf\n"); exit(33); } p = (short *) mmap(0, 16384, PROT_READ, MAP_SHARED, fd, 0xd8000); /* * Benchmark: copying 16 megabytes of memory from p a word * at a time. */ printf("p = %p\n", (void *) p); for (i = 0; i < 1024; ++i) docopy(d, p); exit(0); }