summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2009-02-06 13:11:21 +0000
committerDavid Howells <dhowells@redhat.com>2009-02-06 13:11:21 +0000
commit8a3923ac2bfcba7a98724c2546a146aaa7300fed (patch)
tree41cfb878db43d902e2253771abb3e82d9b1b9a9a /init
parent9be260a646bf76fa418ee519afa10196b3164681 (diff)
Create a dynamically sized pool of threads for doing very slow work items
Create a dynamically sized pool of threads for doing very slow work items, such as invoking mkdir() or rmdir() - things that may take a long time and may sleep, holding mutexes/semaphores and hogging a thread, and are thus unsuitable for workqueues. The number of threads is always at least a settable minimum, but more are started when there's more work to do, up to a limit. Because of the nature of the load, it's not suitable for a 1-thread-per-CPU type pool. A system with one CPU may well want several threads. This is used by FS-Cache to do slow caching operations in the background, such as looking up, creating or deleting cache objects. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Serge Hallyn <serue@us.ibm.com>
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig12
1 files changed, 12 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig
index f068071fcc5d..97b0d40968ef 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -952,6 +952,18 @@ config MARKERS
source "arch/Kconfig"
+config SLOW_WORK
+ default n
+ bool "Enable slow work thread pool"
+ help
+ The slow work thread pool provides a number of dynamically allocated
+ threads that can be used by the kernel to perform operations that
+ take a relatively long time.
+
+ An example of this would be CacheFiles doing a path lookup followed
+ by a series of mkdirs and a create call, all of which have to touch
+ disk.
+
endmenu # General setup
config HAVE_GENERIC_DMA_COHERENT