Import Alan Cox's /usr/src/sys/kern/sys_pipe.c 1.171. This rips out
writer-side KVA mappings and replaces them with writer-side vm_page wiring
(left intact from before) plus reader-side SF_BUF copies.
Import 1.141, which is a simple patch which removes a blocking condition
when space is available in the pipe's write buffer which was causing
non-blocking I/O select-based writes to spin-wait unnecessarily. 1.171
rips out writer-side KVA mappings and replaces them
Import FreeBSD-5.x's uiomove_fromphys(), which sys_pipe.c now uses. This
procedure could become very useful in a number of DragonFly subsystems.
This greatly improves PIPE performance for the direct-mapped case (moderate
to large reads and writes). Additionally, recent scheduler fixes greatly
improve PIPE performance for both the direct-mapped and small-buffer cases.
NOTE: wired page limits for pipes have not yet been imported, and the heavy
use of sf_buf's may require some tuning in the many-pipes case.
BLKSIZE BEFORE AFTER
MBytes/s MBytes/s Tests on AMD64/3200+ FN85 MB
------- ------ ------ (64KB L1, 1MB L2)
256KB 1900 2200
64KB 1800 2200
16KB 1650 2500-3000
8KB 1400 2300
4KB 1300 1400-1500 (note 1)
note 1: The 4KB case is not a direct-write case, the results are due to
the scheduler fixes only.
Obtained-from: FreeBSD-5.x / FreeBSD's Alan Cox