You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
committed by
Linus Torvalds
parent
b57d426445
commit
d12def1bcb
@@ -296,6 +296,12 @@ struct fuse_conn {
|
||||
/** Number of requests currently in the background */
|
||||
unsigned num_background;
|
||||
|
||||
/** Number of background requests currently queued for userspace */
|
||||
unsigned active_background;
|
||||
|
||||
/** The list of background requests set aside for later queuing */
|
||||
struct list_head bg_queue;
|
||||
|
||||
/** Pending interrupts */
|
||||
struct list_head interrupts;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user