From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751338AbdB0AmF (ORCPT ); Sun, 26 Feb 2017 19:42:05 -0500 Received: from szxga01-in.huawei.com ([45.249.212.187]:3296 "EHLO dggrg01-dlp.huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751110AbdB0AmD (ORCPT ); Sun, 26 Feb 2017 19:42:03 -0500 Subject: Re: [tip:perf/urgent] perf/core: Fix the perf_cpu_time_max_percent check To: Peter Zijlstra References: <1487829879-56237-1-git-send-email-tanxiaojun@huawei.com> <58B13BFD.2050304@huawei.com> <20170225095117.GU6500@twins.programming.kicks-ass.net> CC: , , , , , , , , , , , , "linux-arm-kernel@lists.infradead.org" From: Tan Xiaojun Message-ID: <58B3748E.7080901@huawei.com> Date: Mon, 27 Feb 2017 08:36:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20170225095117.GU6500@twins.programming.kicks-ass.net> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.21.79] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090201.58B37498.0099,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 8b68e78f60e44c7dc725fcf55f8d2448 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > . >