diff options
author | David Howells <dhowells@redhat.com> | 2009-12-01 10:36:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-01 11:20:31 -0500 |
commit | f13a48bd798a159291ca583b95453171b88b7448 (patch) | |
tree | a644293386e30ed5ab297e5943e57658e1d11e6a /kernel/slow-work.c | |
parent | df87f8c06c7f562ef9d93b9d674eebf2ffb96f6a (diff) |
SLOW_WORK: Move slow_work's proc file to debugfs
Move slow_work's debugging proc file to debugfs.
Signed-off-by: David Howells <dhowells@redhat.com>
Requested-and-acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/slow-work.c')
-rw-r--r-- | kernel/slow-work.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/kernel/slow-work.c b/kernel/slow-work.c index b5c17f15f9de..00889bd3c590 100644 --- a/kernel/slow-work.c +++ b/kernel/slow-work.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/kthread.h> | 16 | #include <linux/kthread.h> |
17 | #include <linux/freezer.h> | 17 | #include <linux/freezer.h> |
18 | #include <linux/wait.h> | 18 | #include <linux/wait.h> |
19 | #include <linux/proc_fs.h> | 19 | #include <linux/debugfs.h> |
20 | #include "slow-work.h" | 20 | #include "slow-work.h" |
21 | 21 | ||
22 | static void slow_work_cull_timeout(unsigned long); | 22 | static void slow_work_cull_timeout(unsigned long); |
@@ -138,7 +138,7 @@ static void slow_work_clear_thread_processing(int id) {} | |||
138 | /* | 138 | /* |
139 | * Data for tracking currently executing items for indication through /proc | 139 | * Data for tracking currently executing items for indication through /proc |
140 | */ | 140 | */ |
141 | #ifdef CONFIG_SLOW_WORK_PROC | 141 | #ifdef CONFIG_SLOW_WORK_DEBUG |
142 | struct slow_work *slow_work_execs[SLOW_WORK_THREAD_LIMIT]; | 142 | struct slow_work *slow_work_execs[SLOW_WORK_THREAD_LIMIT]; |
143 | pid_t slow_work_pids[SLOW_WORK_THREAD_LIMIT]; | 143 | pid_t slow_work_pids[SLOW_WORK_THREAD_LIMIT]; |
144 | DEFINE_RWLOCK(slow_work_execs_lock); | 144 | DEFINE_RWLOCK(slow_work_execs_lock); |
@@ -823,7 +823,7 @@ static void slow_work_new_thread_execute(struct slow_work *work) | |||
823 | static const struct slow_work_ops slow_work_new_thread_ops = { | 823 | static const struct slow_work_ops slow_work_new_thread_ops = { |
824 | .owner = THIS_MODULE, | 824 | .owner = THIS_MODULE, |
825 | .execute = slow_work_new_thread_execute, | 825 | .execute = slow_work_new_thread_execute, |
826 | #ifdef CONFIG_SLOW_WORK_PROC | 826 | #ifdef CONFIG_SLOW_WORK_DEBUG |
827 | .desc = slow_work_new_thread_desc, | 827 | .desc = slow_work_new_thread_desc, |
828 | #endif | 828 | #endif |
829 | }; | 829 | }; |
@@ -1055,9 +1055,15 @@ static int __init init_slow_work(void) | |||
1055 | if (slow_work_max_max_threads < nr_cpus * 2) | 1055 | if (slow_work_max_max_threads < nr_cpus * 2) |
1056 | slow_work_max_max_threads = nr_cpus * 2; | 1056 | slow_work_max_max_threads = nr_cpus * 2; |
1057 | #endif | 1057 | #endif |
1058 | #ifdef CONFIG_SLOW_WORK_PROC | 1058 | #ifdef CONFIG_SLOW_WORK_DEBUG |
1059 | proc_create("slow_work_rq", S_IFREG | 0400, NULL, | 1059 | { |
1060 | &slow_work_runqueue_fops); | 1060 | struct dentry *dbdir; |
1061 | |||
1062 | dbdir = debugfs_create_dir("slow_work", NULL); | ||
1063 | if (dbdir && !IS_ERR(dbdir)) | ||
1064 | debugfs_create_file("runqueue", S_IFREG | 0400, dbdir, | ||
1065 | NULL, &slow_work_runqueue_fops); | ||
1066 | } | ||
1061 | #endif | 1067 | #endif |
1062 | return 0; | 1068 | return 0; |
1063 | } | 1069 | } |