Received: by 10.223.185.116 with SMTP id b49csp5250602wrg; Wed, 7 Mar 2018 08:40:45 -0800 (PST) X-Google-Smtp-Source: AG47ELv8TbRgHuqBRMTz/EsW+JJkp4HCPYm1tkGmBWK93SFgG8dQJ1MwOmHeTtZ7ctZOFGCOywcJ X-Received: by 10.99.96.146 with SMTP id u140mr18750135pgb.211.1520440845601; Wed, 07 Mar 2018 08:40:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520440845; cv=none; d=google.com; s=arc-20160816; b=ztfH9cNESoHML59fCPe7kxbVT/q9wCHLtLHW1iB7wBAa3tiEmENihdbMrNCjGkrSul iXf5TudCgXmFkPlvsNrdKKWBKxg/c+rYPiicdroAF+S74udHAXbZ/Cr372Jr5ST+SR+W wd7NwSpzaV5jIjunYzlgZhS5IdY40v3maLMLjQEExuAC8iayVX3APa/hfBn2YHb/OCji GRFiXhdDcf+K/nqPkmtjndGxjfRxiVkhK3iF9FxIkWu05BpMsn5SEhusnbPCoENAS6LI W2J16UelgsApcZ8vzTanF3dceZ/3iRRKFkQW3NXy8TqyaiAjKMjeq6gTbiCMVpr8N7gL zFdQ== 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:arc-authentication-results; bh=URpDFTAHW381r9GY7zCNP0XPVp4GA8AEaagqQAYm6Tc=; b=mpzPcV57+M3EFeGhbteplTzZrEtDaJ4d7vEVwKte94dF7yJudyofiUtjTAfEpRm1rJ bZjojBerYj+5kM7GWPTdS+hMU7EAwFppd5Ie+jclApoozhOvfNiRNpIM00eakR9l81xi af7Pg8FRofsaFgxhdnCDFsqWcMNACiDx/+xW+SIomjXk586gPUG4ONT4Bg3t37MA9leP jzU7rdpD1aYInUh6A6ERHKubt9rOZTNkLxNFtDAXdq/9wbnyuBENzeJLbFmTwYQ2bpYG nm3rkxvfPtt9vHuYmoOARh9kowcY3GijcGxrHKIYjWm8m1CypDo3dB/nAjBCVsGg6iy2 /OpQ== ARC-Authentication-Results: i=1; mx.google.com; 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 9si11470680pgh.687.2018.03.07.08.40.30; Wed, 07 Mar 2018 08:40:45 -0800 (PST) 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; 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 S933963AbeCGQjH (ORCPT + 99 others); Wed, 7 Mar 2018 11:39:07 -0500 Received: from foss.arm.com ([217.140.101.70]:53930 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933894AbeCGQjG (ORCPT ); Wed, 7 Mar 2018 11:39:06 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 35AB61529; Wed, 7 Mar 2018 08:39:06 -0800 (PST) Received: from [192.168.100.244] (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3F21F3F53D; Wed, 7 Mar 2018 08:39:05 -0800 (PST) Subject: Re: [PATCH v1 2/2] perf/core: Add support for PMUs that can be read from any CPU To: Peter Zijlstra , skannan@codeaurora.org Cc: mark.rutland@arm.com, Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , avilaj@codeaurora.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <1519431578-11995-1-git-send-email-skannan@codeaurora.org> <1519431578-11995-2-git-send-email-skannan@codeaurora.org> <20180224084106.GC25201@hirez.programming.kicks-ass.net> <7cab1b91545e81e4b6b09e85c2f81d7e@codeaurora.org> <20180303154113.GH25201@hirez.programming.kicks-ass.net> From: Jeremy Linton Message-ID: Date: Wed, 7 Mar 2018 10:39:04 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180303154113.GH25201@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 Hi, On 03/03/2018 09:41 AM, Peter Zijlstra wrote: > On Mon, Feb 26, 2018 at 05:53:57PM -0800, skannan@codeaurora.org wrote: >> On 2018-02-24 00:41, Peter Zijlstra wrote: >>> On Fri, Feb 23, 2018 at 04:19:38PM -0800, Saravana Kannan wrote: >>>> Some PMUs events can be read from any CPU. So allow the PMU to mark >>>> events as such. For these events, we don't need to reject reads or >>>> make smp calls to the event's CPU and cause unnecessary wake ups. >>>> >>>> Good examples of such events would be events from caches shared across >>>> all CPUs. >>> >>> So why would the existing ACTIVE_PKG not work for you? Because clearly >>> your example does not cross a package. >> >> Because based on testing it on hardware, it looks like the two clusters in >> an ARM DynamIQ design are not considered part of the same "package". When I >> say clusters, I using the more common interpretation of "homogeneous CPUs >> running on the same clock"/CPUs in a cpufreq policy and not ARM's new >> redefinition of cluster. So, on a SoC with 4 little and 4 big cores, it'll >> still trigger a lot of unnecessary smp calls/IPIs that cause unnecessary >> wakeups. > > arch/arm64/include/asm/topology.h:#define topology_physical_package_id(cpu) (cpu_topology[cpu].cluster_id) > > *sigh*... that's just broken... > Its being reworked in the PPTT (currently v7) patch set. For ACPI systems (and hopefully DT machines with the package property set) topology_physical_package and core siblings represent the socket as one would expect. Thanks,