]> git.baikalelectronics.ru Git - kernel.git/commit
fuse: limit queued background requests
authorMiklos Szeredi <mszeredi@suse.cz>
Wed, 6 Feb 2008 09:38:39 +0000 (01:38 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 6 Feb 2008 18:41:13 +0000 (10:41 -0800)
commit9b55bd6e4e0d388b400908cf8dae23e4cd11e281
tree96e151de1e80cacd9202a00b77654533a9754207
parentad3d46a861c05e9a6c9ce6845b285cea1a79a569
fuse: limit queued background requests

Libfuse basically creates a new thread for each new request.  This is fine for
synchronous requests, which are naturally limited.  However background
requests (especially writepage) can cause a thread creation storm.

To avoid this, limit the number of background requests available to userspace.

This is done by introducing another queue for background requests, and a
counter for the number of "active" requests, which are currently available for
userspace.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/fuse/dev.c
fs/fuse/fuse_i.h
fs/fuse/inode.c