perf_counter: do not create perf counter mlock sysctl when CONFIG_PERF_COUNTERS=n
PATCH 1/1 perf_counter: do not create perf counter mlock sysctl when CONFIG_PERF_COUNTERS=n
Building tip from 82811bee3 without CONFIG_PERF_COUNTERS results in:
CC kernel/sysctl.okernel/sysctl.c:928: error: 'sysctl_perf_counter_mlock' undeclared here (not in a function)
This is due to c5078f78b "perf_counter: provide an mlock threshold"
kernel/sysctl.c +2 -0
@@ -922,6 +922,7 @@ static struct ctl_table kern_table[] = { .child = slow_work_sysctls, },#endif +#ifdef CONFIG_PERF_COUNTERS { .ctl_name = CTL_UNNUMBERED, .procname = "perf_counter_mlock_kb",
@@ -930,6 +931,7 @@ static struct ctl_table kern_table[] = { .mode = 0644, .proc_handler = &proc_dointvec, }, +#endif /* * NOTE: do not add new entries to this table unless you have read * Documentation/sysctl/ctl_unnumbered.txt
Quoted 21 lines · Ian Campbell
Building tip from
82811bee3withoutCONFIG_PERF_COUNTERSresults in:CC
kernel/sysctl.okernel/sysctl.c:928: error: 'sysctl_perf_counter_mlock' undeclared here (not in a function)This is due to
c5078f78b"perf_counter: provide an mlock threshold"Signed-off-by Ian Campbell <[email protected]>kernel/sysctl.c +1
-0@@ -922,6 +922,7 @@ static struct ctl_table kern_table[] = { .child = slow_work_sysctls, },#endif +#ifdef CONFIG_PERF_COUNTERS { .ctl_name = CTL_UNNUMBERED, .procname = "perf_counter_mlock_kb",
kernel/sysctl.c static struct ctl_table kern_table[] = { · line 937
Quoted 7 lines
kernel/sysctl.c +1
-0@@ -930,6 +931,7 @@ static struct ctl_table kern_table[] = { .mode = 0644, .proc_handler = &proc_dointvec, }, +#endif /* * NOTE: do not add new entries to this table unless you have read * Documentation/sysctl/ctl_unnumbered.txt
Hm, is this still needed? It doesnt apply here and i'm not seeing build failures.
Thanks,
Ingo
Quoted 9 lines · Ingo Molnar
Quoted 4 lines · Ian Campbell
Building tip from
82811bee3withoutCONFIG_PERF_COUNTERSresults in:CC
kernel/sysctl.okernel/sysctl.c:928: error: 'sysctl_perf_counter_mlock' undeclared here (not in a function)Hm, is this still needed? It doesnt apply here and i'm not seeing build failures.
Looks like I was using an obsolete branch, on current tip (790dc57b) it was already fixed by the commit which added the first perf counter sysctl in 1ccd1549.
Ian.