cvs commit: src/sys/kern sys_pipe.c
Mike Silbersack
silby at FreeBSD.org
Sun Aug 15 18:27:25 PDT 2004
silby 2004-08-16 01:27:24 UTC
FreeBSD src repository
Modified files:
sys/kern sys_pipe.c
Log:
Major enhancements to pipe memory usage:
- pipespace is now able to resize non-empty pipes; this allows
for many more resizing opportunities
- Backing is no longer pre-allocated for the reverse direction
of pipes. This direction is rarely (if ever) used, so this cuts the
amount of map space allocated to a pipe in half.
- Pipe growth is now much more dynamic; a pipe will now grow when
the total amount of data it contains and the size of the write are
larger than the size of pipe. Previously, only individual writes greater
than the size of the pipe would cause growth.
- In low memory situations, pipes will now shrink during both read
and write operations, where possible. Once the memory shortage
ends, the growth code will cause these pipes to grow back to an appropriate
size.
- If the full PIPE_SIZE allocation fails when a new pipe is created, the
allocation will be retried with SMALL_PIPE_SIZE. This helps to deal
with the situation of a fragmented map after a low memory period has
ended.
- Minor documentation + code changes to support the above.
In total, these changes increase the total number of pipes that
can be allocated simultaneously, drastically reducing the chances that
pipe allocation will fail.
Performance appears unchanged due to dynamic resizing.
Revision Changes Path
1.177 +136 -55 src/sys/kern/sys_pipe.c
More information about the cvs-src
mailing list