Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2218112ybh; Fri, 24 Jul 2020 07:22:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxn/dwETzZ8a56xcak+V5ErIT+REkigogiXjoU/Ypx/2OHjP+IjwaWVo3k4Tn34esGUidCJ X-Received: by 2002:a05:6402:12d0:: with SMTP id k16mr2350559edx.199.1595600527431; Fri, 24 Jul 2020 07:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595600527; cv=none; d=google.com; s=arc-20160816; b=oQff0CCtshGfw6gcR13zEKhEPhp9zwlx1kjW9PC1EWWjRIOKvFENbnMt0kMeuydh+V NyR+X6LUDsrgZ58agDYBLm3RjhPeN9EpS0FYCLOk9PYNi0Y3CgAV+QJxSGEocJ3x8lZe PAF3CzJ7fC16+hXfqLPLGpdgO4MeBO+iFZxkShnGqxdEDJtZm0nUdiHcLLpJ21isIvzV LUYixlBVDSuuSh6IJnuh+jZuhZ7N7Ei1gq5A4fTI7+rKSnqjhMaTqSDp06DaeS3JR/Lp 0/E+fDxNzqWe0029i0Ez5QXQWwA1+Vb3O+PPSaEUQkNxWiXrL/HkwPSY8R8JYb8/P4Gm 4R9Q== 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=vNwPxG+pIaKXfbdgO5Sbkyva3EpzDz5b+42QdAoqffU=; b=vfOQ3XxPxFJBtsk/ZAUd4/lAL8DTxK1y89Z9rpAZ+rZODKAkHkl/ZrHbiz2VqeVEoe GjiqCY4BEAoxqCpJLJBchSDa2hCrTKIgLvOyjar6BmWH9MRRycZTxXmY7ec7eiBoh/Mu YUSk4mkAty8WMHxdLfpDeshfBGRy2kgwB4Hpju6A8/gBR1i6Xk5YTM95/185jAoEPeTl 3bAExdp0P8Lkor9zCl1uxy/Ip4A1gc1u38dNagezjYd+fUrKUsPRFYuBMhyRzSX/bFJI UA35WX7O7sD0Mw9LEZUx23VQ0xSoGDcitSw+22fkYQDNQGey2pxtEt2MYAuLpQfu5XwY /mxg== 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 be28si547076edb.373.2020.07.24.07.21.45; Fri, 24 Jul 2020 07:22:07 -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 S1726820AbgGXOT3 (ORCPT + 99 others); Fri, 24 Jul 2020 10:19:29 -0400 Received: from mga09.intel.com ([134.134.136.24]:46189 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726617AbgGXOT3 (ORCPT ); Fri, 24 Jul 2020 10:19:29 -0400 IronPort-SDR: nRnK/G0KWBMIK7bUpz/ktxV2LcA7ZRLGFV+il8k0I4cKFK7IhF62O1H+1jKUfm2BaAHtbrCmW0 hU5L0+qTWboQ== X-IronPort-AV: E=McAfee;i="6000,8403,9691"; a="151999228" X-IronPort-AV: E=Sophos;i="5.75,391,1589266800"; d="scan'208";a="151999228" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2020 07:19:28 -0700 IronPort-SDR: M15gSmBAZFSwW5sx31wOEJE5JR2PYjmucNIRxIeU7lc3rLCBd9s9e6270tzXgDV2t2cGQ6K2LT bXjY8SLbMGGQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,391,1589266800"; d="scan'208";a="488753651" Received: from linux.intel.com ([10.54.29.200]) by fmsmga006.fm.intel.com with ESMTP; 24 Jul 2020 07:19:27 -0700 Received: from [10.252.140.222] (kliang2-mobl.ccr.corp.intel.com [10.252.140.222]) (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 DDA34580638; Fri, 24 Jul 2020 07:19:26 -0700 (PDT) Subject: Re: [PATCH V7 07/14] perf/core: Add a new PERF_EV_CAP_COEXIST event capability To: Peter Zijlstra 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, like.xu@linux.intel.com References: <20200723171117.9918-1-kan.liang@linux.intel.com> <20200723171117.9918-8-kan.liang@linux.intel.com> <20200724105543.GV119549@hirez.programming.kicks-ass.net> <20200724114628.GJ43129@hirez.programming.kicks-ass.net> <0d33a25c-cfe4-af7f-c915-a98dba17b53b@linux.intel.com> <20200724135412.GA10769@hirez.programming.kicks-ass.net> From: "Liang, Kan" Message-ID: Date: Fri, 24 Jul 2020 10:19:25 -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: <20200724135412.GA10769@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/24/2020 9:54 AM, Peter Zijlstra wrote: > On Fri, Jul 24, 2020 at 09:43:44AM -0400, Liang, Kan wrote: >> >> >> On 7/24/2020 7:46 AM, peterz@infradead.org wrote: >>> On Fri, Jul 24, 2020 at 12:55:43PM +0200, peterz@infradead.org wrote: >>>>> + event_sched_out(event, cpuctx, ctx); >>>>> + perf_event_set_state(event, PERF_EVENT_STATE_ERROR); >>>>> +} >>>> >>>> Ah, so the problem here is that ERROR is actually recoverable using >>>> IOC_ENABLE. We don't want that either. Let me try and figure out of EXIT >>>> would work. >>> >>> EXIT is difficult too.. Also, that COEXIST thing hurt my brian, can't we >>> do a simpler SIBLING thing that simply requires the event to be a group >>> sibling? >>> >>> The consequence is that SLOTS must be the leader, is that really a >>> problem? You keep providing the {cycles, slots, metric-things} example, >>> but afaict {slots, metric-thing, cycles} should work just fine too. >>> PERF_SAMPLE_READ with PERF_FORMAT_GROUP doesn't need to the the leader. >> >> I'm not sure I get your point. >> For the PERF_SAMPLE_READ with PERF_FORMAT_GROUP case, other events can be >> the leader, e.g., {cycles, slots, metric-things}:S. >> In this case, the SLOTS event is not a leader. I don't think we can assume >> that the SLOTS event must be the leader. > > You can have a sibling event with SAMPLE_READ and FORMAT_GROUP just > fine. The sampling event doesn't need to be the leader. > There will be a problem for the current perf tool, which assumes that the leader event is the sampling event. I will check how can we specially handle it in the perf tool. Thanks, Kan