aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pipe_fs_i.h
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2010-05-19 15:03:16 -0400
committerJens Axboe <jens.axboe@oracle.com>2010-05-21 15:12:52 -0400
commitb492e95be0ae672922f4734acf3f5d35c30be948 (patch)
treea8a1e7f035903796e6b8f626add8d269bf989a35 /include/linux/pipe_fs_i.h
parent35f3d14dbbc58447c61e38a162ea10add6b31dc7 (diff)
pipe: set lower and upper limit on max pages in the pipe page array
We need at least two to guarantee proper POSIX behaviour, so never allow a smaller limit than that. Also expose a /proc/sys/fs/pipe-max-pages sysctl file that allows root to define a sane upper limit. Make it default to 16 times the default size, which is 16 pages. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/pipe_fs_i.h')
-rw-r--r--include/linux/pipe_fs_i.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
index 65f4282fcbaf..16de3933c45e 100644
--- a/include/linux/pipe_fs_i.h
+++ b/include/linux/pipe_fs_i.h
@@ -139,6 +139,8 @@ void pipe_lock(struct pipe_inode_info *);
139void pipe_unlock(struct pipe_inode_info *); 139void pipe_unlock(struct pipe_inode_info *);
140void pipe_double_lock(struct pipe_inode_info *, struct pipe_inode_info *); 140void pipe_double_lock(struct pipe_inode_info *, struct pipe_inode_info *);
141 141
142extern unsigned int pipe_max_pages;
143
142/* Drop the inode semaphore and wait for a pipe event, atomically */ 144/* Drop the inode semaphore and wait for a pipe event, atomically */
143void pipe_wait(struct pipe_inode_info *pipe); 145void pipe_wait(struct pipe_inode_info *pipe);
144 146