aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/slow-work.c
diff options
context:
space:
mode:
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 @@
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
22static void slow_work_cull_timeout(unsigned long); 22static 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
142struct slow_work *slow_work_execs[SLOW_WORK_THREAD_LIMIT]; 142struct slow_work *slow_work_execs[SLOW_WORK_THREAD_LIMIT];
143pid_t slow_work_pids[SLOW_WORK_THREAD_LIMIT]; 143pid_t slow_work_pids[SLOW_WORK_THREAD_LIMIT];
144DEFINE_RWLOCK(slow_work_execs_lock); 144DEFINE_RWLOCK(slow_work_execs_lock);
@@ -823,7 +823,7 @@ static void slow_work_new_thread_execute(struct slow_work *work)
823static const struct slow_work_ops slow_work_new_thread_ops = { 823static 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}