From 81c4577e2354523020033d403cfd8face04533e4 Mon Sep 17 00:00:00 2001 From: Vegard Nossum Date: Sat, 13 Aug 2016 08:30:07 +1200 Subject: [PATCH] pipe.7: Document /proc files controlling memory usage by pipes Document /proc/sys/fs/pipe-max-size and /proc/sys/fs/pipe-user-pages-{soft,hard}. Signed-off: Vegard Nossum Signed-off-by: Michael Kerrisk --- man7/pipe.7 | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/man7/pipe.7 b/man7/pipe.7 index 50d441689..18cba7f33 100644 --- a/man7/pipe.7 +++ b/man7/pipe.7 @@ -159,6 +159,38 @@ The operation is not specified in any standard, but is provided on many implementations. .\" +.SS /proc files +On Linux, the following files control how much memory can be used for pipes: +.TP +.IR /proc/sys/fs/pipe-max-pages " (since Linux 2.6.34)" +.\" commit b492e95be0ae672922f4734acf3f5d35c30be948 +Deprecated since Linux 2.6.35. +.TP +.IR /proc/sys/fs/pipe-max-size " (since Linux 2.6.35)" +.\" commit ff9da691c0498ff81fdd014e7a0731dab2337dac +The maximum size (in bytes) of individual pipes created or set by users +without the +.B CAP_SYS_RESOURCE +capability. +.TP +.IR /proc/sys/fs/pipe-user-pages-hard " (since Linux 4.4)" +.\" commit 759c01142a5d0f364a462346168a56de28a80f52 +The combined maximum size (in pages) of all pipes created or set by a +single user without both the +.B CAP_SYS_RESOURCE +and +.B CAP_SYS_ADMIN +capabilities. +.TP +.IR /proc/sys/fs/pipe-user-pages-soft " (since Linux 4.4)" +.\" commit 759c01142a5d0f364a462346168a56de28a80f52 +The combined size (in pages) of all pipes created or set by a single +user (without both the +.B CAP_SYS_RESOURCE +and +.B CAP_SYS_ADMIN +capabilities) after which individual pipes will be limited to 1 page. +.\" .SS PIPE_BUF POSIX.1 says that .BR write (2)s