History

hung_task: move hung_task sysctl interface to hung_task.c

The kernel/sysctl.c is a kitchen sink where everyone leaves their dirty dishes, this makes it very difficult to maintain. To help with this maintenance let's start by moving sysctls to places where they actually belong. The proc sysctl maintainers do not want to know what sysctl knobs you wish to add for your own piece of code, we just care about the core logic. So move hung_task sysctl interface to hung_task.c and use register_sysctl() to register the sysctl interface. [mcgrof@kernel.org: commit log refresh and fixed 2-3 0day reported compile issues]

Xiaoming Ni committed 4 years ago

Commit bbe7a101 parent 78e36f33 files · +79 −77Browse files

Showing the changes to include (1 of 3 files). Show all

Unified · Split

include/linux/sched/sysctl.h+1−13
@@ -7,20 +7,8 @@ · 6 unmodified lines
7struct ctl_table;7struct ctl_table;
8 8
9#ifdef CONFIG_DETECT_HUNG_TASK9#ifdef CONFIG_DETECT_HUNG_TASK
10 10/* used for hung_task and block/ */
11#ifdef CONFIG_SMP
12extern unsigned int sysctl_hung_task_all_cpu_backtrace;
13#else
14#define sysctl_hung_task_all_cpu_backtrace 0
15#endif /* CONFIG_SMP */
16
17extern int sysctl_hung_task_check_count;
18extern unsigned int sysctl_hung_task_panic;
19extern unsigned long sysctl_hung_task_timeout_secs;11extern unsigned long sysctl_hung_task_timeout_secs;
20extern unsigned long sysctl_hung_task_check_interval_secs;
21extern int sysctl_hung_task_warnings;
22int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
23 void *buffer, size_t *lenp, loff_t *ppos);
24#else12#else
25/* Avoid need for ifdefs elsewhere in the code */13/* Avoid need for ifdefs elsewhere in the code */
26enum { sysctl_hung_task_timeout_secs = 0 };14enum { sysctl_hung_task_timeout_secs = 0 };

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t