Block Copy Support

The kernel spends a large proportion of its time copying or zeroing blocks of data. These blocks may be internal buffers or data structures, but a common operation involves zeroing or copying a page of memory, which is 4 Kbytes or 8 Kbytes. The data is not often used again immediately, so it does not need to be cached. In fact, the data being copied or zeroed will normally remove useful data from the cache. The standard C library routines for this operation are called bcopy and memcpy; they handle arbitrary alignments and lengths of copies.

Software Page Copies

The most efficient way to copy a page on a system with a write-back cache is to read a cache line, then write it as a block, using two bus transactions. The sequence ...

Get Sun Performance and Tuning: Java™ and the Internet, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.