Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2943178pxf; Sun, 14 Mar 2021 18:27:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydO+6FDwGNTHZrrp7vd5fNgw30/lF3lGAp1OMQ1WF+RSTV44Z/pzlQbyG17Ll/9VMchFCD X-Received: by 2002:a05:6402:1283:: with SMTP id w3mr27065297edv.340.1615771625717; Sun, 14 Mar 2021 18:27:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615771625; cv=none; d=google.com; s=arc-20160816; b=LQLcQgQIMYNAL7BDWrX3iZEgsj0R7ih11wC+TmOZpJuJfT/trCK3OKnY1msNbPW9h8 Hr4pImYaHVQ6bWKdythJ6ciH9ZUM3QPgfaEElJsOLU4ZaubkLUrANxY0rsOn3vB0Mmm5 CpCr+CHeuqVvqRBvcr/vMrz3v+V8SXsqbGHTvYP184GhsuoBo6vqn4bvR7z6ldLbhj39 iarlTChYvtFtwkkLDG6jmGIb3/fmK6qOLrb5bPYQqSXu/rP2v1d7WIcnTkpu+HZbrR5T W856KdFssUho6+BlPDNiOnbGIY/1rO8QZ/KOnpdGzpgIGAEPofKvdB7ugfwEKmbpp8/f iPFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence: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=O3XtobuVhR2WZU73tzm/ns4vSCf2GOy7LVt6rDvwZQY=; b=YikuST2d9wBzdI8l6AN2TsY3lkWM0OFJ40pOo71BO/5FkQEiLKRZ7lAWBXayfvdFy7 yxutoNO5j2lOqmgskjmSsRufrCWspdb8wo1QnBGeKdmc65EL7kBnFsCFS2yZWmBAMNKe MuaFdM4y2tgJyHHZTmWlibQhyHa3eJG4nemgET2Gl8D/aAe2X0QSW2ulhu7jTCo670kf oWbPlqb+J3bOIk79iQ/zpW11TBOsZTbwRHMOusPbLHtmkRszhyK3UpHQ1BTn2zkL8R3Y vJyvWJFOPypMetY7mBR07+4txuF69PrZxZijWQ4zMS+WbMHiPubFqppdUSjLYvRi1p4W 6cZA== 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 k9si9838582ejc.706.2021.03.14.18.26.43; Sun, 14 Mar 2021 18:27:05 -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 S229679AbhCOBZm (ORCPT + 99 others); Sun, 14 Mar 2021 21:25:42 -0400 Received: from mga05.intel.com ([192.55.52.43]:63731 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229494AbhCOBZ3 (ORCPT ); Sun, 14 Mar 2021 21:25:29 -0400 IronPort-SDR: wLBXwF9Cr4CjA75kzP7yvptdaeI213a6E2qnbcmTio8kMAWvyEs9XN3HPxqkI1jPoI+5SfMQeW rRdesp56Y4TQ== X-IronPort-AV: E=McAfee;i="6000,8403,9923"; a="274064413" X-IronPort-AV: E=Sophos;i="5.81,249,1610438400"; d="scan'208";a="274064413" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2021 18:25:23 -0700 IronPort-SDR: SCQAArOtPSLGQskwJbnP9HymAjc4p2JAv7OC3h7OGmzL2e6ROS2rxjEunNdWXChgBm4dcSLBrr AyUJ/fnb9nXg== X-IronPort-AV: E=Sophos;i="5.81,249,1610438400"; d="scan'208";a="411672159" Received: from yjin15-mobl1.ccr.corp.intel.com (HELO [10.238.4.6]) ([10.238.4.6]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2021 18:25:20 -0700 Subject: Re: [PATCH v2 07/27] perf evlist: Hybrid event uses its own cpus To: Jiri Olsa Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com References: <20210311070742.9318-1-yao.jin@linux.intel.com> <20210311070742.9318-8-yao.jin@linux.intel.com> From: "Jin, Yao" Message-ID: Date: Mon, 15 Mar 2021 09:25:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jiri, On 3/13/2021 3:15 AM, Jiri Olsa wrote: > On Thu, Mar 11, 2021 at 03:07:22PM +0800, Jin Yao wrote: >> On hybrid platform, atom events can be only enabled on atom CPUs. Core >> events can be only enabled on core CPUs. So for a hybrid event, it can >> be only enabled on it's own CPUs. >> >> But the problem for current perf is, the cpus for evsel (via PMU sysfs) >> have been merged to evsel_list->core.all_cpus. It might be all CPUs. >> >> So we need to figure out one way to let the hybrid event only use it's >> own CPUs. >> >> The idea is to create a new evlist__invalidate_all_cpus to invalidate >> the evsel_list->core.all_cpus then evlist__for_each_cpu returns cpu -1 >> for hybrid evsel. If cpu is -1, hybrid evsel will use it's own cpus. > > that's wild.. I don't understand when you say we don't have > cpus for evsel, because they have been merged.. each evsel > has evsel->core.own_cpus coming from pmu->cpus, right? > > why can't you just filter out cpus that are in there? > > jirka > Yes, you're right. This patch is wide and actually it's not very necessary. The current framework has processed the cpus for evsel well even for hybrid evsel. So this patch can be dropped. Thanks Jin Yao