Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b303e7c1 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar
Browse files

perf/core: Make sysctl_perf_cpu_time_max_percent conform to documentation



Markus reported that 0 should also disable the throttling we per
Documentation/sysctl/kernel.txt.

Reported-by: default avatarMarkus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Fixes: 91a612ee ("perf/core: Fix dynamic interrupt throttle")
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent e1089602
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -412,7 +412,8 @@ int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
	if (ret || !write)
		return ret;

	if (sysctl_perf_cpu_time_max_percent == 100) {
	if (sysctl_perf_cpu_time_max_percent == 100 ||
	    sysctl_perf_cpu_time_max_percent == 0) {
		printk(KERN_WARNING
		       "perf: Dynamic interrupt throttling disabled, can hang your system!\n");
		WRITE_ONCE(perf_sample_allowed_ns, 0);