Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1792731ybl; Sat, 31 Aug 2019 02:21:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqz2v1y7xyOZEe/El1CkcCunUqh89xCGrkmFg445hsgiVIrFxH6W/ZjChBbQOBTD67be82y/ X-Received: by 2002:a63:c009:: with SMTP id h9mr16442905pgg.166.1567243264302; Sat, 31 Aug 2019 02:21:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567243264; cv=none; d=google.com; s=arc-20160816; b=BdSVp+mdel4uG778EkahXyluNz7K733eu9grk3xRWC8WzXT9SC8K1/rS0b9PS8AKcy b2apcX62IZzmy3fYHyZFl0xyNQhYLsBXupC53J1fsTtbaduzQD4p54mIpgm3MIPTSb9Q tDHbFweLhu1kyth9YNdA2nlMo6ixALDZzy8nmr0IP10RYqtA9Z6Ehy+jh6v2eHgEIMMk 8rHFr7zSjsdEaVDEenmLooR8sy7LO/ThfNk6pNe7OJ6IlrGjr6uPqOCr9UQ7hOr0nGFH M96CogDn09/lvnasnZag4N6Fagiq7zVXX7pcN7xrsxBKGGx1zct0UKctzW0qLikfr1M4 8EPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=we5Tr511phlcjEEmThH3qVv+D23i8ugbd1UVU1aMdkQ=; b=i6JYellsJcPpwIwjyutWvmGyKvScU6M1p8GUx7853VCpLe4w3iMN/YRFu6B8/w74Bl kSDeCIblmgPPn0leetMMlzOl5vHeMQ8Rr1Cm9pvAhCMGFJuaGY3SoL93cradSH3kgzwO KKSKDINn+R3V20lnSRU9m1ROEMepE+tEJ7FFp3heagyu64pMIWkOt/9lg34gaChehMRm oxfmW2l9maf/bTOX7nh4973rpn8PV72ZBiZdtGAwT8g0h64V9VZs3f6F0381voezwiyg N4ylJO36s5SbLhCgJXfS3D9MBVx/X2A4f634yB0tkKEg5s3yUNgoYwztt9e9fh880sUs Tfdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=fVJw8Gsl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i188si8255559pfe.96.2019.08.31.02.20.49; Sat, 31 Aug 2019 02:21:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=fVJw8Gsl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726963AbfHaJTh (ORCPT + 99 others); Sat, 31 Aug 2019 05:19:37 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:40864 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726102AbfHaJTg (ORCPT ); Sat, 31 Aug 2019 05:19:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=we5Tr511phlcjEEmThH3qVv+D23i8ugbd1UVU1aMdkQ=; b=fVJw8GslMP00MVMjqcpSTMy9Y EpP8Mng7pwd0r59ORAZfNPUvGMF0YfTEUC7oEyITWyPChjJbZMhMbJp9yfm7hCJtHUHDfaPf9LZ5K AdqBcD7QSjsmL/H/AIW6t3xLCdNPCXovuVWWloqDvP06kAAiijicH8VEL8+CU2Z4q8j23x5a3k6cI 02WEUhkath+cw4MjKDTIVfg0RF72D6gbf/BojeDRhqUrwu8Mn91oGMUZEyAS620PAa63MPrrcRuB+ 1dwS8NnjmfUdCdgBr1vMLIhT3bN+xa4YNWUgtJJKogORAnKPVBNwMWhDX7jLBhI/c5EU6xsQJUsbW sdMNLRIYQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1i3zXh-0001kr-9U; Sat, 31 Aug 2019 09:19:33 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 955BB301747; Sat, 31 Aug 2019 11:18:56 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 89F8529B2CD17; Sat, 31 Aug 2019 11:19:31 +0200 (CEST) Date: Sat, 31 Aug 2019 11:19:31 +0200 From: Peter Zijlstra To: Andi Kleen Cc: kan.liang@linux.intel.com, acme@kernel.org, mingo@redhat.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, jolsa@kernel.org, eranian@google.com, alexander.shishkin@linux.intel.com Subject: Re: [RESEND PATCH V3 3/8] perf/x86/intel: Support hardware TopDown metrics Message-ID: <20190831091931.GJ2369@hirez.programming.kicks-ass.net> References: <20190826144740.10163-1-kan.liang@linux.intel.com> <20190826144740.10163-4-kan.liang@linux.intel.com> <20190828150238.GC17205@worktop.programming.kicks-ass.net> <20190828190445.GQ5447@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190828190445.GQ5447@tassilo.jf.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 28, 2019 at 12:04:45PM -0700, Andi Kleen wrote: > > > NMI > > > ====== > > > > > > The METRICS register may be overflow. The bit 48 of STATUS register > > > will be set. If so, update all active slots and metrics events. > > > > that happen? It would be useful to get that METRIC_OVF (can we please > > This happens when the internal counters that feed the metrics > overflow. > > > If this is so; then we can use this to update/reset PERF_METRICS and > > nothing else. > > It has to be handled in the PMI. That's what I wrote; Overflow is always NMI. > > Then there is no mucking about with that odd counter/metrics msr pair > > reset nonsense. Becuase that really stinks. > > You have to write them to reset the internal counters. But not for ever read, only on METRIC_OVF.