Date: Sun, 10 Aug 1997 22:34:09 -0700 From: Mike Haertel <mike@ducky.net> 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 Message-ID: <199708110534.WAA03574@ducky.net> In-Reply-To: Your message of "Sun, 10 Aug 1997 21:33:16 PDT." <199708110433.VAA08541@implode.root.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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 <fcntl.h> #include <sys/mman.h> 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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708110534.WAA03574>