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]
Showing the changes to include (1 of 3 files). Show all
Unified · Split
| @@ -7,20 +7,8 @@ · 6 unmodified lines | ||
| 7 | 7 | struct ctl_table; |
| 8 | 8 | |
| 9 | 9 | #ifdef CONFIG_DETECT_HUNG_TASK |
| 10 | − | |
| 11 | −#ifdef CONFIG_SMP | |
| 12 | −extern unsigned int sysctl_hung_task_all_cpu_backtrace; | |
| 13 | −#else | |
| 14 | −#define sysctl_hung_task_all_cpu_backtrace 0 | |
| 15 | −#endif /* CONFIG_SMP */ | |
| 16 | − | |
| 17 | −extern int sysctl_hung_task_check_count; | |
| 18 | −extern unsigned int sysctl_hung_task_panic; | |
| 10 | +/* used for hung_task and block/ */ | |
| 19 | 11 | extern unsigned long sysctl_hung_task_timeout_secs; |
| 20 | −extern unsigned long sysctl_hung_task_check_interval_secs; | |
| 21 | −extern int sysctl_hung_task_warnings; | |
| 22 | −int proc_dohung_task_timeout_secs(struct ctl_table *table, int write, | |
| 23 | − void *buffer, size_t *lenp, loff_t *ppos); | |
| 24 | 12 | #else |
| 25 | 13 | /* Avoid need for ifdefs elsewhere in the code */ |
| 26 | 14 | enum { sysctl_hung_task_timeout_secs = 0 }; |