summaryrefslogtreecommitdiff
path: root/kernel/slow-work.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2009-12-01 15:36:11 +0000
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-01 08:20:31 -0800
commitf13a48bd798a159291ca583b95453171b88b7448 (patch)
treea644293386e30ed5ab297e5943e57658e1d11e6a /kernel/slow-work.c
parentdf87f8c06c7f562ef9d93b9d674eebf2ffb96f6a (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.c18
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 @@
#include <linux/kthread.h>
#include <linux/freezer.h>
#include <linux/wait.h>
-#include <linux/proc_fs.h>
+#include <linux/debugfs.h>
#include "slow-work.h"
static void slow_work_cull_timeout(unsigned long);
@@ -138,7 +138,7 @@ static void slow_work_clear_thread_processing(int id) {}
/*
* Data for tracking currently executing items for indication through /proc
*/
-#ifdef CONFIG_SLOW_WORK_PROC
+#ifdef CONFIG_SLOW_WORK_DEBUG
struct slow_work *slow_work_execs[SLOW_WORK_THREAD_LIMIT];
pid_t slow_work_pids[SLOW_WORK_THREAD_LIMIT];
DEFINE_RWLOCK(slow_work_execs_lock);
@@ -823,7 +823,7 @@ static void slow_work_new_thread_execute(struct slow_work *work)
static const struct slow_work_ops slow_work_new_thread_ops = {
.owner = THIS_MODULE,
.execute = slow_work_new_thread_execute,
-#ifdef CONFIG_SLOW_WORK_PROC
+#ifdef CONFIG_SLOW_WORK_DEBUG
.desc = slow_work_new_thread_desc,
#endif
};
@@ -1055,9 +1055,15 @@ static int __init init_slow_work(void)
if (slow_work_max_max_threads < nr_cpus * 2)
slow_work_max_max_threads = nr_cpus * 2;
#endif
-#ifdef CONFIG_SLOW_WORK_PROC
- proc_create("slow_work_rq", S_IFREG | 0400, NULL,
- &slow_work_runqueue_fops);
+#ifdef CONFIG_SLOW_WORK_DEBUG
+ {
+ struct dentry *dbdir;
+
+ dbdir = debugfs_create_dir("slow_work", NULL);
+ if (dbdir && !IS_ERR(dbdir))
+ debugfs_create_file("runqueue", S_IFREG | 0400, dbdir,
+ NULL, &slow_work_runqueue_fops);
+ }
#endif
return 0;
}