Received: by 10.223.185.116 with SMTP id b49csp5142288wrg; Wed, 7 Mar 2018 07:02:11 -0800 (PST) X-Google-Smtp-Source: AG47ELvTb4uPeLXZ7xd9njANUNJTkZ1uOhbNiGadz5E8yqsoQpqtnF1KBLQX14A85+bGszVOGWmb X-Received: by 10.98.78.68 with SMTP id c65mr18082414pfb.65.1520434920466; Wed, 07 Mar 2018 07:02:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520434908; cv=none; d=google.com; s=arc-20160816; b=JIkoET+Z6V55YM127jdiLzTHcOsFUw5G1rIkO4x8iMdi1R2AaVNSLN2P3tO/UJcJ2v 96MbXp4e++KyramrFcg7/GvO5ZW1eE2aRk7YN0NsJmVOPIgjLSuSNj1p8cGAwh3omzpd K8Sgw9rdbDm8aTpokW8elrkLZITpqIQ0xQbykok6yXGi6z6+25kzjQ9VgFnJpZifUb79 LrHhGU+wDC+1LGciJBX3BQXQ/mKT2L1QxDwnUHkmUZ1IEdNpyUJyyzGGR2FKV1j+RdX0 2DIYI5URyb0+DtuwjIg0zh/uQ6O+hfoauOhrmqihZCDnqt9CZm6XB3EBuRS9ecQJz+9b lYbQ== 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=eYfVj5/33yFprglAsqv8GGDVLsVuDZJJ0tufBWsv684=; b=MMTwdvqk6pc9/dsnmgucDijUwe3Ojo9tDCgiU96LAHy/MtbEtIR0WHrU/rcJMZOPEC A2ZPY97Wnmu8HdAsQhT6xeJtpd1rp38sXlYjS6zOfMg31hiiD/YJRtEqEjn7Rt84I9+r j0b5bONWzOVjokdaNEyrnizP4PxkHetucmSB10g7R2rtDhZQtqlc9BwZZho/lKiu11xE J8q2T2V8kJgwE53nRVWwnM8N7oTN2BfZbMA0mVssCs5z94dwLyufEImXXYEqaR2LIuvE maLZRihT1E01qNXgjK0BsN2TnaJR6Jyb5c86qgQR+NVe/V80qIWw3DBwpP86uY1TrUim bCyg== 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 d13si11428364pgn.366.2018.03.07.07.01.32; Wed, 07 Mar 2018 07:01:48 -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 S1754641AbeCGO7j (ORCPT + 99 others); Wed, 7 Mar 2018 09:59:39 -0500 Received: from foss.arm.com ([217.140.101.70]:52246 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754389AbeCGO7i (ORCPT ); Wed, 7 Mar 2018 09:59:38 -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 3AB751435; Wed, 7 Mar 2018 06:59:38 -0800 (PST) Received: from [10.1.206.28] (e107814-lin.cambridge.arm.com [10.1.206.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0D3BF3F25C; Wed, 7 Mar 2018 06:59:35 -0800 (PST) Subject: Re: [PATCH v11 8/8] perf: ARM DynamIQ Shared Unit PMU support To: Saravana Kannan , Mark Rutland Cc: 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 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> From: Suzuki K Poulose Message-ID: Date: Wed, 7 Mar 2018 14:59:34 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <5A9DC03B.8020201@codeaurora.org> Content-Type: text/plain; charset=us-ascii; 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 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. > > Can you make sure this thread is on Suzuki's radar? > > Suzuki, > > Could please respond? IPI for DSUs are definitely a pain for us. Thanks Suzuki