Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp828974ybh; Tue, 21 Jul 2020 08:52:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweF9w1ukYUYx0CF+mb/pC+EJR1VEowhcAcgn0hMBsJMjy17cxcvWTUqg9RgwrA4PMZyrSy X-Received: by 2002:a17:906:f752:: with SMTP id jp18mr25365508ejb.538.1595346742039; Tue, 21 Jul 2020 08:52:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595346742; cv=none; d=google.com; s=arc-20160816; b=N1cybW/ALPNAtm6rSV4+zbzIIBAgmE1ST3m0mJBwBCXbjSQaNl2O2RMygl/WfM+a2M PsuqPB023eY9KfCwREnWaWzVci+7Kp32koo1I2rntUSz9W3n+O6aZQMnj4clsZqhJd1P Y0u7eKcEV8QEZWps0nivwQy6mRJtN3NmndHjDfm7qZ1JChTTVHisJ/JkdMl7wl81ptDu oZumRZ1Nt/PE4ldWddHfazxUr+cMm0aeeIAimnHwv6UJXEt08xMKfwVQo+YNxmsEczmi L1s0wRx8NaGNm6xPbuvGo0prUjS946XqW7a0l2fmKbhu1pSQkVEIR6CPQP76UX0Y6LR9 +JDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=GiKotFijXTQYRBwGWJjowHaiXwLrv+OvGMmoTYZi5YQ=; b=OUeq5w3EtzARXpwGPrLQUaf7/9l1cFTP7QDO/PFJ/L6A0LmqpFY1yp41zS3Z29nGVK vYVOaEOPDukSrsaZkKyC0Nc3KFSjKl1kFHJCKMw1yidd++2lJfmem/bII5QAPTgUYfj0 nvu5jbMwcMFdHVxLiwAk/Lds21/hvWYZR9/sigLIhffqEgpGJNWRL0cfg8owu7OvkJ+K 5/6c2u+59GdIpUwJX8xg7PnndKUP3neaaz35r/sNPJJhtFFZ0nZo4hjU67oZlSHkk+y0 qsw8B/RkotEIV7jZmZubLMxbICA6jQmD2tCp8TUhXHy5aVgifeE3CJqb8msoZlKqElUJ T2HQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rn4si13722198ejb.569.2020.07.21.08.51.58; Tue, 21 Jul 2020 08:52:22 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730048AbgGUPuz (ORCPT + 99 others); Tue, 21 Jul 2020 11:50:55 -0400 Received: from mga18.intel.com ([134.134.136.126]:26151 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726029AbgGUPuy (ORCPT ); Tue, 21 Jul 2020 11:50:54 -0400 IronPort-SDR: BOf9CFe584nXIWoc6rLLnGG6wtbu1UH7wvvJZE662lmmJWXd7iRS3L5UvhUprTcY3xPz+4swup ZSB/2LEWHTow== X-IronPort-AV: E=McAfee;i="6000,8403,9689"; a="137655004" X-IronPort-AV: E=Sophos;i="5.75,379,1589266800"; d="scan'208";a="137655004" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2020 08:50:54 -0700 IronPort-SDR: tmWePrX5hy4Kaid55JWDoJLvTsGoycmX2AjTKagX4RBRNm0XSGKcOL7qnW6TPf0e+lDwc6v65z 3xNQ50q02UlQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,379,1589266800"; d="scan'208";a="326409174" Received: from linux.intel.com ([10.54.29.200]) by FMSMGA003.fm.intel.com with ESMTP; 21 Jul 2020 08:50:53 -0700 Received: from [10.254.76.99] (kliang2-mobl.ccr.corp.intel.com [10.254.76.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id EE541580299; Tue, 21 Jul 2020 08:50:51 -0700 (PDT) Subject: Re: [PATCH V6 09/14] perf/x86/intel: Support TopDown metrics on Ice Lake To: peterz@infradead.org 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 References: <20200717140554.22863-1-kan.liang@linux.intel.com> <20200717140554.22863-10-kan.liang@linux.intel.com> <20200721124042.GX10769@hirez.programming.kicks-ass.net> <20200721143110.GL119549@hirez.programming.kicks-ass.net> From: "Liang, Kan" Message-ID: <59795cbd-a95c-8fdd-522d-199fbb047b8a@linux.intel.com> Date: Tue, 21 Jul 2020 11:50:49 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200721143110.GL119549@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/21/2020 10:31 AM, peterz@infradead.org wrote: > 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? I think it's missed in the current patch set. The suggested code in patch 11 forces SLOTS to be the leader. I will apply it in V7. Thanks, Kan