Received: by 10.223.185.116 with SMTP id b49csp5540642wrg; Wed, 7 Mar 2018 13:38:01 -0800 (PST) X-Google-Smtp-Source: AG47ELuxk4hGi+Us7xcpQy0N8xHb45hx5PWsNWginO+kpOC4Kc5QeAY6qajh15FZi5RzwWzEUDL4 X-Received: by 2002:a17:902:7d94:: with SMTP id a20-v6mr21858800plm.184.1520458681562; Wed, 07 Mar 2018 13:38:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520458681; cv=none; d=google.com; s=arc-20160816; b=jt+MJmh8Vtue4Wd98FoY3WVJZMrxScS9PJQ0WNa5Fws78Zy0NnbZqjRhaQ1OLSn9ur UCqgfGnQsndbMLM+rD1wSR1ZcWMk2CkeAJhX4elhmm4mO0Hxzz5S8W7ZQ7WDKLVHW/ZT JsqN9SHJ+nYXcaZfarT7uMU5VyDu/GGGRMiFaXXw0T2Xqz1bh8tbUDVPuBRRd9iCjYxm fTCM19I1dBHrF5W1CTPlatMkSGEb1Y4WTXJkBmnfYEh5NuyS0mFLgq89psFkdKrfcr2a BCC7zOVf6SGleVUHzZmG6WELZLx/cnV5WhBs2BAj87/Dqr77M3XYJZrmjatwqAcUVV43 V0Pw== 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:in-reply-to :references:subject:cc:to:mime-version:user-agent:from:date :message-id:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=GRcr3nLCLHyltf7MlPyJuYWcHacOv+MzjVRsYibNXdA=; b=VlH0j/RnA4dRUftCh8i9L+hQmBd7Eivi0xD2kKhCxoZ+2A17z6ZRQIIy4UgwAbxFgV yIGDZWYwf1vdEu7z0Abc8h5GeZcxm4IuLJkkQspoH4FbS+QqX8lcsJSMkH/Gk+Dkv8pA o1RJdTLleevW86E9mb2gG5C8+z1K9RYHSS86LNW93qEyzd3tXlEvFVNUJZyNhXx3Km9f dKRr2B8ZMqIpbDqPjoRz6W5V9jUYkrwF8DJ28cGZx6Wsmtwv+gIPcS5mUhslpNF6MoLK 6rjW+5pCGOB3z0KDQqshcg1krVDmnxXNPycL0qn9JyzTuiFvRHN6FKM0IqLhC2L9h3Qd rI4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=DxpFqMLF; dkim=pass header.i=@codeaurora.org header.s=default header.b=DxpFqMLF; 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 u19si8675580pfk.128.2018.03.07.13.37.47; Wed, 07 Mar 2018 13:38:01 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=DxpFqMLF; dkim=pass header.i=@codeaurora.org header.s=default header.b=DxpFqMLF; 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 S1754832AbeCGVg1 (ORCPT + 99 others); Wed, 7 Mar 2018 16:36:27 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:35986 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754553AbeCGVg0 (ORCPT ); Wed, 7 Mar 2018 16:36:26 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D7DA16022C; Wed, 7 Mar 2018 21:36:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520458585; bh=h8W2+MuEZRN4EvewlMhWp0NEDcNJ/nPr+JYS/qC4uGM=; h=Date:From:To:CC:Subject:References:In-Reply-To:From; b=DxpFqMLFHe0x/iehqxdR2/8rsQUAJ28YO6mw8u8BJfG3lNR7d94kXuIYEpxJAIKZY I4f3aQn0d3qxFpHnqrkxwjC1OERx8NHMY59Ep/5ZHYY4DvxB+PQPdGU6im8jAaqx6Y 0S64sC/eX8LihnoTqaFBWiVl3tBOn9+p9YWyzp4A= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.134.64.210] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: skannan@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 82EEB6022C; Wed, 7 Mar 2018 21:36:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520458585; bh=h8W2+MuEZRN4EvewlMhWp0NEDcNJ/nPr+JYS/qC4uGM=; h=Date:From:To:CC:Subject:References:In-Reply-To:From; b=DxpFqMLFHe0x/iehqxdR2/8rsQUAJ28YO6mw8u8BJfG3lNR7d94kXuIYEpxJAIKZY I4f3aQn0d3qxFpHnqrkxwjC1OERx8NHMY59Ep/5ZHYY4DvxB+PQPdGU6im8jAaqx6Y 0S64sC/eX8LihnoTqaFBWiVl3tBOn9+p9YWyzp4A= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 82EEB6022C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=skannan@codeaurora.org Message-ID: <5AA05B57.9010005@codeaurora.org> Date: Wed, 07 Mar 2018 13:36:23 -0800 From: Saravana Kannan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: Suzuki K Poulose CC: Mark Rutland , robh@kernel.org, mathieu.poirier@linaro.org, peterz@infradead.org, sudeep.holla@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, marc.zyngier@arm.com, jonathan.cameron@huawei.com, frowand.list@gmail.com, leo.yan@linaro.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v11 8/8] perf: ARM DynamIQ Shared Unit PMU support References: <20180102112533.13640-1-suzuki.poulose@arm.com> <20180102112533.13640-9-suzuki.poulose@arm.com> <5A90B77E.8040105@codeaurora.org> <20180225143653.peb4quk3ha5h3t5x@salmiak> <5A972A7D.9020301@codeaurora.org> <20180301114911.fundyuqxtj5klk4e@lakrids.cambridge.arm.com> <5A986425.9080007@codeaurora.org> <20180302104223.7tpsyhsum7nej237@lakrids.cambridge.arm.com> <5A99A3DC.9020400@codeaurora.org> <20180305105925.4cjiqejfid7rswe6@lakrids.cambridge.arm.com> <5A9DC03B.8020201@codeaurora.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/07/2018 06:59 AM, Suzuki K Poulose wrote: > > > Hi Saravana, > > Sorry for the late response, I was out on vacation. > > On 05/03/18 22:10, Saravana Kannan wrote: >> On 03/05/2018 02:59 AM, Mark Rutland wrote: >>> On Fri, Mar 02, 2018 at 11:19:56AM -0800, Saravana Kannan wrote: >>>> On 03/02/2018 02:42 AM, Mark Rutland wrote: >>>>> It's important to note that the DSU PMU's event_init() ensures events >>>>> are affine to a single CPU, and the perf core code serializes >>>>> operations >>>>> on those events via the context lock. >>>> >>>> Ah, I see that now. Thanks! >>>> >>>>> Therefore, two CPUs *won't* try to access the registers >>>>> simultaneously. >>>> >>>> Right, and this driver seems to be going through a lot of work to >>>> make sure >>>> all events are read in one CPU. >>>> >>>> Do you even have an upstream target where there are multiple DSU's in a >>>> system? >>> >>> I have no idea, though I do beleive that it's possible for a system to >>> have multiple DSUs. >>> >>>> If not, we can simplify a ton of this code (no hotplug notifiers, no >>>> migrating PMUs, no SMP calls, etc) by just adding a spinlock and >>>> letting any >>>> CPU read these DSU counters. >>> >>> Regardless of whether we allow arbitrary CPUs to read the counters, >>> other logic still needs to be CPU affine, and we'll still need hotplug >>> notifiers and event migration. >> >> If you have to support multiple DSUs in a system, then the need is >> obvious. But if you don't have to support multiple DSU, it's not >> obvious to me on why you still need CPU affining or hotplug notifiers. >> Could you please provide me pointers for general understanding? >> > > We need to support multiple DSUs as such configurations are possible. > >> >>> I am not necessarily opposed to allowing read() calls from associated >>> CPUs, but as before, I'll leave that to Suzuki. > > I am fine with reading the registers from any of the associated CPUs. > If that's the case, can you please use my patch? And if it looks good to you, give an Ack and ask Peter to pull it in as you'd be the user? Thanks, Saravana -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project