From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751185AbdBKUli (ORCPT ); Sat, 11 Feb 2017 15:41:38 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:33800 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750867AbdBKUlh (ORCPT ); Sat, 11 Feb 2017 15:41:37 -0500 Date: Sat, 11 Feb 2017 21:41:33 +0100 From: Ingo Molnar To: Borislav Petkov Cc: Robert Richter , Arnaldo Carvalho de Melo , Peter Zijlstra , Vince Weaver , lkml Subject: Re: [RFC PATCH] perf/stat: Add --disable-hwdt Message-ID: <20170211204132.GB19264@gmail.com> References: <20170206124447.GA12772@gmail.com> <20170206124937.zlowglr5gpq35piy@pd.tnic> <20170206131832.GG4906@rric.localdomain> <20170206132349.bl6qbpjflez3lpkp@pd.tnic> <20170207072512.GB18584@gmail.com> <20170207105412.yrvnd3ks42jjtrtg@pd.tnic> <20170207150610.k7aptdiqtpxqd6dp@pd.tnic> <20170211170330.nm2ew4nxwa2mn3fo@pd.tnic> <20170211175910.GA31544@gmail.com> <20170211183218.ijnvb5f7ciyuunx4@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170211183218.ijnvb5f7ciyuunx4@pd.tnic> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Borislav Petkov wrote: > On Sat, Feb 11, 2017 at 06:59:10PM +0100, Ingo Molnar wrote: > > So I checked the perf-list manpage and it didn't tell me much about how to disable > > the NMI watchdog. > > Oh, it is buried there: > > " > EVENT GROUPS > ------------ > > ... > > > Globally pinned events can limit the number of counters available for > other groups. On x86 systems, the NMI watchdog pins a counter by default. > The nmi watchdog can be disabled as root with > > echo 0 > /proc/sys/kernel/nmi_watchdog" > > > How about a more proactive hint, something like: > > > > To disable the NMI watchdog permanently, do: > > Why permanently? We want it to run and be disabled around the > measurement only. Anyway, here's something more to the point: > + if (print_free_counters_hint) > + fprintf(output, > +"Some events weren't counted. Try disabling the NMI watchdog:\n" > +" echo 0 > /proc/sys/kernel/nmi_watchdog\n" > +" perf stat ...\n" > +" echo 1 > /proc/sys/kernel/nmi_watchdog\n"); > } Ok, looks good to me! Acked-by: Ingo Molnar Thanks, Ingo