[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160402110017.GP3448@twins.programming.kicks-ass.net>
Date: Sat, 2 Apr 2016 13:00:17 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Markus Trippelsdorf <markus@...ppelsdorf.de>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Subject: Re: "perf: interrupt took too long" messages even with
perf_cpu_time_max_percent==0
On Sat, Apr 02, 2016 at 11:32:39AM +0200, Markus Trippelsdorf wrote:
> Current git kernel sometimes shows:
>
> perf: interrupt took too long (71 > 52), lowering kernel.perf_event_max_sample_rate to 300
> perf: interrupt took too long (103 > 88), lowering kernel.perf_event_max_sample_rate to 300
> perf: interrupt took too long (130 > 128), lowering kernel.perf_event_max_sample_rate to 300
> perf: interrupt took too long (175 > 162), lowering kernel.perf_event_max_sample_rate to 300
> perf: interrupt took too long (219 > 218), lowering kernel.perf_event_max_sample_rate to 300
> ...
>
> when running e.g. "perf top" even when
> /proc/sys/kernel/perf_cpu_time_max_percent is set to 0.
Ah, was 0 also meant to disable it?
Does the below help?
---
kernel/events/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 8c3b35f2a269..21ba024c9ed1 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -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);
Powered by blists - more mailing lists