From: tanxiaojun@huawei.com (Tan Xiaojun)
To: linux-arm-kernel@lists.infradead.org
Subject: [tip:perf/urgent] perf/core: Fix the perf_cpu_time_max_percent check
Date: Mon, 27 Feb 2017 08:36:30 +0800 [thread overview]
Message-ID: <58B3748E.7080901@huawei.com> (raw)
In-Reply-To: <20170225095117.GU6500@twins.programming.kicks-ass.net>
On 2017/2/25 17:51, Peter Zijlstra wrote:
> On Sat, Feb 25, 2017 at 04:10:37PM +0800, Tan Xiaojun wrote:
>
>> Recently I was using perf_fuzzer for testing in Hisilicon
>> D03/D05(arm64, linux-4.10-rc1).
>>
>> As we know perf_fuzzer will write a random value to procfs interface
>> of perf event(like sysctl_perf_cpu_time_max_percent). The value may be
>> 0 or 100, and I get logs like below:
>>
>> ----------------------------------
>> [ 4046.358811] perf: Dynamic interrupt throttling disabled, can hang your system!
>> ----------------------------------
>>
>> Most of the time, there is no problem, and the perf_fuzzer test can
>> end without any warings or errors. But there is a small probability
>> that triggers the RCU and watchdog (The log is attached at the end).
>> It hungs after local_irq_enable() in __do_softirq.
>>
>> I think this is due to the dynamic interrupt throttling disabled and
>> too many hardware interruptions come. So I limit the
>> sysctl_perf_cpu_time_max_percent can only be set 1 to 99 in the kernel
>> codes. I test more than 20 times in D03, and there are no errors or
>> warnings in the test.
>>
>> So I want to ask:
>>
>> 1)Is it a problem or not? (It has already given you a warning.)
>>
>> 2)If it is, where we will fix it more appropriate, perf_fuzzer(not set
>> 0 or 100) or kernel(limit 1 to 99), or maybe it is the bug of
>> hardware(too many hardware interruptions)?
>
> I think the best would be if the fuzzer would not set 0,100, those are
> clearly 'unsafe' settings and you pretty much get to keep the pieces.
>
> I would like to preserve these settings for people that 'know' what
> they're doing and are willing to take the risk, but clearly, when you
> take the guard-rails off, things can come apart.
>
OK. It makes sense, I agree.
Thank you for your answer.
Xiaojun.
> .
>
WARNING: multiple messages have this Message-ID (diff)
From: Tan Xiaojun <tanxiaojun@huawei.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: <jolsa@redhat.com>, <alexander.shishkin@linux.intel.com>,
<eranian@google.com>, <hpa@zytor.com>, <mingo@kernel.org>,
<linux-kernel@vger.kernel.org>, <acme@redhat.com>,
<acme@kernel.org>, <vincent.weaver@maine.edu>,
<tglx@linutronix.de>, <torvalds@linux-foundation.org>,
<linux-tip-commits@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [tip:perf/urgent] perf/core: Fix the perf_cpu_time_max_percent check
Date: Mon, 27 Feb 2017 08:36:30 +0800 [thread overview]
Message-ID: <58B3748E.7080901@huawei.com> (raw)
In-Reply-To: <20170225095117.GU6500@twins.programming.kicks-ass.net>
On 2017/2/25 17:51, Peter Zijlstra wrote:
> On Sat, Feb 25, 2017 at 04:10:37PM +0800, Tan Xiaojun wrote:
>
>> Recently I was using perf_fuzzer for testing in Hisilicon
>> D03/D05(arm64, linux-4.10-rc1).
>>
>> As we know perf_fuzzer will write a random value to procfs interface
>> of perf event(like sysctl_perf_cpu_time_max_percent). The value may be
>> 0 or 100, and I get logs like below:
>>
>> ----------------------------------
>> [ 4046.358811] perf: Dynamic interrupt throttling disabled, can hang your system!
>> ----------------------------------
>>
>> Most of the time, there is no problem, and the perf_fuzzer test can
>> end without any warings or errors. But there is a small probability
>> that triggers the RCU and watchdog (The log is attached at the end).
>> It hungs after local_irq_enable() in __do_softirq.
>>
>> I think this is due to the dynamic interrupt throttling disabled and
>> too many hardware interruptions come. So I limit the
>> sysctl_perf_cpu_time_max_percent can only be set 1 to 99 in the kernel
>> codes. I test more than 20 times in D03, and there are no errors or
>> warnings in the test.
>>
>> So I want to ask:
>>
>> 1)Is it a problem or not? (It has already given you a warning.)
>>
>> 2)If it is, where we will fix it more appropriate, perf_fuzzer(not set
>> 0 or 100) or kernel(limit 1 to 99), or maybe it is the bug of
>> hardware(too many hardware interruptions)?
>
> I think the best would be if the fuzzer would not set 0,100, those are
> clearly 'unsafe' settings and you pretty much get to keep the pieces.
>
> I would like to preserve these settings for people that 'know' what
> they're doing and are willing to take the risk, but clearly, when you
> take the guard-rails off, things can come apart.
>
OK. It makes sense, I agree.
Thank you for your answer.
Xiaojun.
> .
>
next prev parent reply other threads:[~2017-02-27 0:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-23 6:04 [PATCH] perf/core: Fix to check perf_cpu_time_max_percent Tan Xiaojun
2017-02-24 9:15 ` [tip:perf/urgent] perf/core: Fix the perf_cpu_time_max_percent check tip-bot for Tan Xiaojun
2017-02-25 8:10 ` Tan Xiaojun
2017-02-25 8:10 ` Tan Xiaojun
2017-02-25 9:51 ` Peter Zijlstra
2017-02-25 9:51 ` Peter Zijlstra
2017-02-27 0:36 ` Tan Xiaojun [this message]
2017-02-27 0:36 ` Tan Xiaojun
2017-03-13 18:35 ` Vince Weaver
2017-03-14 1:52 ` Tan Xiaojun
2017-04-15 7:58 ` [BUG arm64] OOPS when using /proc/kcore to disassemble the kernel symbols in "perf top" Tan Xiaojun
[not found] ` <58F1DE6A.7050307@huawei.com>
2017-04-19 4:14 ` [arm64] " Pratyush Anand
2017-04-19 8:01 ` Tan Xiaojun
2017-04-19 11:49 ` Mark Rutland
2017-04-20 1:38 ` Tan Xiaojun
2017-04-21 5:46 ` Tan Xiaojun
2017-04-21 9:34 ` Mark Rutland
2017-04-24 1:02 ` Tan Xiaojun
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=58B3748E.7080901@huawei.com \
--to=tanxiaojun@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.