diff options
author | David Howells <dhowells@redhat.com> | 2009-04-03 11:42:35 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2009-04-03 11:42:35 -0400 |
commit | 07fe7cb7c7c179f473fd9c823348fd3eb5dad369 (patch) | |
tree | 516c959de929a4c39870629e550b3307601fa73f /init/Kconfig | |
parent | 8fe74cf053de7ad2124a894996f84fa890a81093 (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>
Acked-by: Steve Dickson <steved@redhat.com>
Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Tested-by: Daire Byrne <Daire.Byrne@framestore.com>
Diffstat (limited to 'init/Kconfig')
-rw-r--r-- | init/Kconfig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig index 1398a14b0191..236a79377b8e 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -1014,6 +1014,18 @@ config MARKERS | |||
1014 | 1014 | ||
1015 | source "arch/Kconfig" | 1015 | source "arch/Kconfig" |
1016 | 1016 | ||
1017 | config SLOW_WORK | ||
1018 | default n | ||
1019 | bool "Enable slow work thread pool" | ||
1020 | help | ||
1021 | The slow work thread pool provides a number of dynamically allocated | ||
1022 | threads that can be used by the kernel to perform operations that | ||
1023 | take a relatively long time. | ||
1024 | |||
1025 | An example of this would be CacheFiles doing a path lookup followed | ||
1026 | by a series of mkdirs and a create call, all of which have to touch | ||
1027 | disk. | ||
1028 | |||
1017 | endmenu # General setup | 1029 | endmenu # General setup |
1018 | 1030 | ||
1019 | config HAVE_GENERIC_DMA_COHERENT | 1031 | config HAVE_GENERIC_DMA_COHERENT |