Subject: Re: zbufs for NetBSD
To: None <>
From: David Laight <>
List: tech-kern
Date: 09/10/2002 15:57:55
On Mon, Sep 09, 2002 at 07:56:45AM -0600, wrote:
> Good point.  IMHO zero copy receives and sends are nice features for a
> networked OS.  How they are implemented (zbufs or something else) is less
> important than having the feature.
> Kyle

Are you sure you actually understand the cost of memory-memory copies.
It is often MUCH less than you image.

For instance the Pentium 4 book says:

The Pentium 4, Intel Xeon, and P6 family processors modify the processors
operation during the string store operations (initiated with the MOVS and
STOS instructions) to maximize performance.  Once the "fast string"
operations initial conditions are met (as described below), the processor
will essentially operate on, from an external perspective, the string in a
cache line by cache line mode.  This results in the processor looping on
issuing a cache-line read for the source address and an invalidation on the
external bus for the destination address, knowing that all bytes in the
destination cache line will be modified, for the length of the string.  In
this mode interrupts will only be accepted by the processor on cache line
boundaries.  It is possible in this mode that the destination line
invalidations, and therefore stores, will be issued on the external bus out
of order.

Initial conditions for "fast string" operations:
- EDI and ESI must be 8-byte aligned for the Pentium III processor.
   EDI must be 8-byte aligned for the Pentium 4 processor.
- String operation must be performed in ascending address order.
- The initial operation counter (ECX) must be equal to or greater than 64.


David Laight: