From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751465AbdE3Nvc (ORCPT ); Tue, 30 May 2017 09:51:32 -0400 Received: from mga07.intel.com ([134.134.136.100]:7292 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751224AbdE3Nva (ORCPT ); Tue, 30 May 2017 09:51:30 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,418,1491289200"; d="scan'208";a="1154464285" Date: Tue, 30 May 2017 06:51:28 -0700 From: Andi Kleen To: Peter Zijlstra Cc: Stephane Eranian , Vince Weaver , "Liang, Kan" , "mingo@redhat.com" , "linux-kernel@vger.kernel.org" , "alexander.shishkin@linux.intel.com" , "acme@redhat.com" , "jolsa@redhat.com" , "torvalds@linux-foundation.org" , "tglx@linutronix.de" Subject: Re: [PATCH 1/2] perf/x86/intel: enable CPU ref_cycles for GP counter Message-ID: <20170530135128.GI24144@tassilo.jf.intel.com> References: <20170522091916.3gydvflk4fnqkzw5@hirez.programming.kicks-ass.net> <37D7C6CF3E00A74B8858931C1DB2F077536F079F@SHSMSX103.ccr.corp.intel.com> <20170522192335.v4gvhz24ix2jeihg@hirez.programming.kicks-ass.net> <20170523063913.363ssgcy7kmeesye@hirez.programming.kicks-ass.net> <20170524154518.GA24144@tassilo.jf.intel.com> <20170530092523.xkuj5lqpq5pb5y4m@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170530092523.xkuj5lqpq5pb5y4m@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 30, 2017 at 11:25:23AM +0200, Peter Zijlstra wrote: > On Sun, May 28, 2017 at 01:31:09PM -0700, Stephane Eranian wrote: > > Ultimately, I would like to see the watchdog move out of the PMU. That > > is the only sensible solution. > > You just need a resource able to interrupt on NMI or you handle > > interrupt masking in software as has > > been proposed on LKML. > > So even if we do the soft masking, we still need to deal with regions > where the interrupts are disabled. Once an interrupt hits the soft mask > we still hardware mask. > > So to get full and reliable coverage we still need an NMI source. You would only need a single one per system however, not one per CPU. RCU already tracks all the CPUs, all we need is a single NMI watchdog that makes sure RCU itself does not get stuck. So we just have to find a single watchdog somewhere that can trigger NMI. > I agree that it would be lovely to free up the one counter though. One option is to use the TCO watchdog in the chipset instead. Unfortunatley it's not an universal solution because some BIOS lock the TCO watchdog for their own use. But if you have a BIOS that doesn't do that it should work. > One other approach is running the watchdog off of _any_ PMI, then all we > need to ensure is that PMIs happen semi regularly. There are two cases > where this becomes 'interesting': Seems fairly complex. -Andi