delayacct: Add sysctl to enable at runtime
Just like sched_schedstats, allow runtime enabling (and disabling) of delayacct. This is useful if one forgot to add the delayacct boot time option. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/YJkhebGJAywaZowX@hirez.programming.kicks-ass.net
This commit is contained in:
@@ -71,6 +71,7 @@
|
||||
#include <linux/coredump.h>
|
||||
#include <linux/latencytop.h>
|
||||
#include <linux/pid.h>
|
||||
#include <linux/delayacct.h>
|
||||
|
||||
#include "../lib/kstrtox.h"
|
||||
|
||||
@@ -1727,6 +1728,17 @@ static struct ctl_table kern_table[] = {
|
||||
.extra2 = SYSCTL_ONE,
|
||||
},
|
||||
#endif /* CONFIG_SCHEDSTATS */
|
||||
#ifdef CONFIG_TASK_DELAY_ACCT
|
||||
{
|
||||
.procname = "task_delayacct",
|
||||
.data = NULL,
|
||||
.maxlen = sizeof(unsigned int),
|
||||
.mode = 0644,
|
||||
.proc_handler = sysctl_delayacct,
|
||||
.extra1 = SYSCTL_ZERO,
|
||||
.extra2 = SYSCTL_ONE,
|
||||
},
|
||||
#endif /* CONFIG_TASK_DELAY_ACCT */
|
||||
#ifdef CONFIG_NUMA_BALANCING
|
||||
{
|
||||
.procname = "numa_balancing",
|
||||
|
||||
Reference in New Issue
Block a user