Accelerating memset/memcpy
Nicolas BOUQUET <[email protected]> Tue, 01 Oct 2002 10:01:39 +0000
| Newsgroups | gmane.os.netbsd.ports.mips |
|---|---|
| Message-ID | <[email protected]> |
Hi, I recently benchmarked the hardware memory subsystem of our MIPS-based board (currently using PMC RM5231), and I was surprised to see that memory writes were slower than memory reads. My benchmark routine uses KSEG0 with write back for its tests. So I took my books and found the reason quickly: in my case, memory writes in a particular cacheline are preceded by a cache refill if the line was previously unused. But in my case, these cache refill are not needed since I write entire cachelines (I transfert large blocks of data and measure the time it takes). RM5231's datasheet states that this behaviour can be corrected by issuing a "create dirty exclusive" cache operation on the lines concerned. Doing so effectively increased write throughput: I can write to memory at 125MBytes/s instead of 50MBytes/s. So here comes my question/reflexion: could these modifications be applied to NetBSD kernel, for example through memset/memcpy routines ? -- Nicolas BOUQUET Low-level software and hardware engineer IPricot SA FRANCE