mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tan Xiaojun <tanxiaojun@huawei.com>
To: <alexander.levin@verizon.com>, <peterz@infradead.org>,
	<wangnan0@huawei.com>, <guohanjun@huawei.com>
Cc: <linuxarm@huawei.com>, <linux-kernel@vger.kernel.org>
Subject: [PATCH -stable 4.1 3/4] perf/core: Make sysctl_perf_cpu_time_max_percent conform to documentation
Date: Mon, 6 Mar 2017 15:14:24 +0800	[thread overview]
Message-ID: <1488784465-58402-4-git-send-email-tanxiaojun@huawei.com> (raw)
In-Reply-To: <1488784465-58402-1-git-send-email-tanxiaojun@huawei.com>

From: Peter Zijlstra <peterz@infradead.org>

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

Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Peter 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: 91a612eea9a3 ("perf/core: Fix dynamic interrupt throttle")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
---
 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 f96ad76..350c45a 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -241,7 +241,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);
-- 
1.9.1

  parent reply	other threads:[~2017-03-06  6:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-06  7:14 [PATCH -stable 4.1 0/4] perf/core: Fix dynamic interrupt throttle Tan Xiaojun
2017-03-06  7:14 ` [PATCH -stable 4.1 1/4] " Tan Xiaojun
2017-03-06  7:14 ` [PATCH -stable 4.1 2/4] perf/core: Fix implicitly enable " Tan Xiaojun
2017-03-06  7:14 ` Tan Xiaojun [this message]
2017-03-06  7:14 ` [PATCH -stable 4.1 4/4] perf/core: Fix the perf_cpu_time_max_percent check Tan Xiaojun
2017-03-06 22:19 ` [PATCH -stable 4.1 0/4] perf/core: Fix dynamic interrupt throttle alexander.levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1488784465-58402-4-git-send-email-tanxiaojun@huawei.com \
    --to=tanxiaojun@huawei.com \
    --cc=alexander.levin@verizon.com \
    --cc=guohanjun@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=peterz@infradead.org \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®