Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp770298ybh; Tue, 21 Jul 2020 07:34:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtnAuEF/xb9ceClFm1JcXImkdbcmIcp9lMxc3HgSrMPnGLW+NOz4xTz17qm+qIdIPn7G36 X-Received: by 2002:a17:906:e299:: with SMTP id gg25mr24994478ejb.160.1595342048047; Tue, 21 Jul 2020 07:34:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595342048; cv=none; d=google.com; s=arc-20160816; b=RcUY1aszdi5OfiFSVROSOdnI1dLXu6OFM63JlUR14J64HxGez4yw9oe/dhKsO15mij TZu13ArQtDWtYVSXZJkjsKy+Ye0CwZc1P34V95FkmNRowzTFk+rt1dGNZOj0midOeFea VzA/peQdi+oDToipoEBU9YSHLdHumPqH2xsoEmOBMq7KzCnum8oAGHrZPeZO24jWJIyV +HHOk5Si1xtX10nkk6jOPa0EU+xX678PsMqHDceqP0UwFSgDF1OJEglU9KAD4qxsk3Hd R2FqC10S40wGFURk7KBX8yb1bfs/ylplEwjeLSJJEOe42YJr1KGWaCt7l+gK0O3YBCzV Lzug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=tvGZd0v1SeMgk23O6CYm8+moWpoxBTXKQ3cBxy3ez6Y=; b=VbxM44mMnsbyUlokHojcVZ16INOQtgvEewW+N5a5G3khWdCmqGJO5z1BbCdMJiaeyo TDBhRD9K54fwV+dc4quR86LJXoNRHsjLAmiyqCaIDinQuj2Zjac1p28T+vGF19m8iDNc NfzkcHKI30oeypt9iTYtdMHdeucGZYRJaHxTIY1MGPyLeNe5IW1wlM0Iw72KPxt7eWty IXLS6Ypgo05wQXBC1X5un21T43v8tXRwskOtWuQJiXnJ2lQ+rxjhZwZ0GTSeke6TCGzN IkrX7POXlZtF96ONgiQjS4trTLVAY6xMx+Ykfh1npwwt6ThGwxxXiGWYfZfw90mLrJ5M 5tVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=nSS8H5CI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s11si10668246ejd.441.2020.07.21.07.33.44; Tue, 21 Jul 2020 07:34:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=nSS8H5CI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729349AbgGUObV (ORCPT + 99 others); Tue, 21 Jul 2020 10:31:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728385AbgGUObU (ORCPT ); Tue, 21 Jul 2020 10:31:20 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64933C061794 for ; Tue, 21 Jul 2020 07:31:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=tvGZd0v1SeMgk23O6CYm8+moWpoxBTXKQ3cBxy3ez6Y=; b=nSS8H5CIDb4RAy12BXqahloGm6 1cn3mOmfOyMPQ9e/ih9YWGsEIyuOc0NB0EXYFMCE8KU5IpTOW953Ui/TsH/+0nPJoWcO39VuTjfN/ ypJJgPbYZbDp7fIJPzKkkON2KGhuX8gpQIr3sHLqQ+9OEuaqx90GWh418KqcsoJNbLFctWqwc1L73 P+4/OJaPyZ5wbL48Wpy/k6FEfhA7mdr9la0NmTB1hyvBu0f8fe7nnJYxoat/NlEJzoGPI6C+uA4OL kh021KeUp9a7B+pklqEkG8l4iFTEqfK1+YMH+XWp3YiCDlY1p8Y5SND0vcs4SrG4XPCVHeAKT8BXN Tuo1WSfQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxtIV-0000R9-4u; Tue, 21 Jul 2020 14:31:12 +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 BBD98304D28; Tue, 21 Jul 2020 16:31:10 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A056E25E22791; Tue, 21 Jul 2020 16:31:10 +0200 (CEST) Date: Tue, 21 Jul 2020 16:31:10 +0200 From: peterz@infradead.org To: "Liang, Kan" Cc: acme@redhat.com, mingo@kernel.org, linux-kernel@vger.kernel.org, jolsa@kernel.org, eranian@google.com, alexander.shishkin@linux.intel.com, ak@linux.intel.com Subject: Re: [PATCH V6 09/14] perf/x86/intel: Support TopDown metrics on Ice Lake Message-ID: <20200721143110.GL119549@hirez.programming.kicks-ass.net> References: <20200717140554.22863-1-kan.liang@linux.intel.com> <20200717140554.22863-10-kan.liang@linux.intel.com> <20200721124042.GX10769@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 21, 2020 at 10:23:36AM -0400, Liang, Kan wrote: > Patch 13 forces the slots event to be part of a metric group. In patch 7, > for a metric group, we only update the values once with slots event. > I think the normal case mentioned above should not happen. > > + /* Only need to call update_topdown_event() once for group read. */ > + if ((cpuc->txn_flags & PERF_PMU_TXN_READ) && > + !is_slots_event(event)) > + return; > + > + perf_pmu_disable(event->pmu); > + x86_pmu.update_topdown_event(event); > + perf_pmu_enable(event->pmu); Ah, I missed that. That also requires SLOTS to be the leader so that it will be the first read. Did we enforce that somewhere?