Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Aug 2004 01:27:24 +0000 (UTC)
From:      Mike Silbersack <silby@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern sys_pipe.c
Message-ID:  <200408160127.i7G1ROW4032546@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408160127.i7G1ROW4032546>