Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760668AbcJ1RKu (ORCPT ); Fri, 28 Oct 2016 13:10:50 -0400 Received: from mail-by2nam01on0058.outbound.protection.outlook.com ([104.47.34.58]:24880 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751856AbcJ1RKs (ORCPT ); Fri, 28 Oct 2016 13:10:48 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jan.Glauber@cavium.com; Date: Fri, 28 Oct 2016 17:36:46 +0200 From: Jan Glauber To: Will Deacon CC: Peter Zijlstra , Mark Rutland , , Subject: Re: [PATCH v3 0/5] Cavium ThunderX uncore PMU support Message-ID: <20161028153646.GA11371@hardcore> References: <1476955841-27898-1-git-send-email-jglauber@cavium.com> <20161020103707.GB3175@twins.programming.kicks-ass.net> <20161020112351.GC13708@hardcore> <20161028151749.GG14402@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20161028151749.GG14402@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [90.186.2.42] X-ClientProxiedBy: AM5PR0601CA0043.eurprd06.prod.outlook.com (10.173.86.157) To BN3PR07MB2578.namprd07.prod.outlook.com (10.167.5.6) X-MS-Office365-Filtering-Correlation-Id: eef15410-fc44-45da-2833-08d3ff4841c8 X-Microsoft-Exchange-Diagnostics: 1;BN3PR07MB2578;2:YyOgOf48gBreWDaven07U5JgQRVcYmrFmpePIaptzvp58tmXfbJa0wP5hpiyEJBpGeTfloOGOtN19j1sHG+M3/EzaLgaac4VPULJasCqTMdE4Q2DVi9ZiLetJyF5mXjzZS5kjJfWXcovzc/G12amxSAB/5kucIuorz831Idj20xtcH0KlfptEfTRloDaiG2E;3:DntdqQjKYC7uK867oISyVFQfSYzDioY2lGgOJNFWmFQcDgW7CCda9hhIMXPrzrvWBZesA+gcYZgVIjOQCTlbtG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S/cFOSTWPY4aTke4SpjxEhn7/AhYFmZYXIhnp10nObACzkKIfVJkhgX4kb0Hj7TVqZ7sR1rRqTTIlFf8itF5PUCKxVx54bhEKJdfZhVjq5hChVrOynTmRd+9oHrq8TOfoUDJeCUIEefNgQc8sCCLpmx1Z9E12/syBRPbRMw8B3Q0NeHB5jg8SKD5WgRcPPvCPmu156AhIq3Y3aR9l4UccBFib/EXz72oVRoSwR72IxDVe+852XCQT9sb52uMbFvoW0GIFduT8c1OH6CKHObaQ46lx5ItmtyaRCZHRwaeMTJcaqp+CP+VHlsX47o6nf8sfMWLd74kuQbU0j9Ww= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046);SRVR:BN3PR07MB2578;BCL:0;PCL:0;RULEID:;SRVR:BN3PR07MB2578; X-Microsoft-Exchange-Diagnostics: 1;BN3PR07MB2578;4:SibLMhRYT8Iu2wzq37AwwEKsI1I/A+R6hgNLNrIbN+o+8eg839Lk1jNabS8DRz9yKj0Qj06/hQTO4ItBBcKDvFvg7NqSgMBGcoDm2EvhOU7XghacyeVxiK9O94ZzB+50ZPm0sBPMtDqIld9MglZSABajQWYH4DCO2oH6pse7DrZzVpwCHuBycaSU9jzQc54ekJtUGplCoVzCqGWAoPeT0FmzrFzAspKCCqVE4tm3Dn8CXniteVB0orvk4GqM0zot7aL95OeBzKEDQpPtlcqIHk5aUQaRRmt3zVpmCGMi8xzjW1CbzKY4clMxmkpOwuWas2sDaKldIV1ycXL6cc48h7JiEZ6MfuSR3vHtUMyiWA/eSqjpKHy76McVA1rrSpLAJLsBed0mMES64WZyQOevhw== X-Forefront-PRVS: 0109D382B0 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(7916002)(24454002)(189002)(199003)(76176999)(4326007)(8676002)(4001350100001)(9686002)(66066001)(50466002)(105586002)(305945005)(47776003)(110136003)(92566002)(68736007)(6116002)(586003)(1076002)(3846002)(7736002)(33716001)(23726003)(6916009)(101416001)(97756001)(54356999)(7846002)(42186005)(2950100002)(77096005)(2906002)(83506001)(81166006)(33656002)(46406003)(42882006)(50986999)(5660300001)(81156014)(93886004)(6666003)(106356001)(189998001)(97736004)(18370500001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN3PR07MB2578;H:hardcore;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN3PR07MB2578;23:xuNvHdLUY1zbhBCUBXfjXsFntnBoPpp4GcNjUAtRj?= =?us-ascii?Q?zlCH/GQWJkHHBS1+pzitb1juZt+tucxG/YygUdF3+oznuWiVn0VbPuwKRvm5?= =?us-ascii?Q?4o1YIfBUUBg1wpaNhwpsKEBDV/YRZsuy+fQhW3bgLggdAEVuv+GPnIe9lAno?= =?us-ascii?Q?dqYn8IMIdrp84bqiLJ8TzYuUNTO+H2RpasSCwIHmWZDmg2sV2zhmYknlY88O?= =?us-ascii?Q?Xi1V44PYZcarvBHHQUEP5ck55ekfqsniVPY46TKbZUc9tGWi32vbaAKiMXGt?= =?us-ascii?Q?02shGI2hLax/Mkn1v1ng1BsNUMRDGjTnn3V78qFLRsl/MqZ66Y6RM0ujkcdi?= =?us-ascii?Q?a1Ifnzb8p3EbvsCaubzlZAmlryjWgcaZDXL1x/QaFwriCyaauacZ7Ijt2Fgo?= =?us-ascii?Q?N7Gd3hB5Ss3nbNP5dJ9vkb+3WBi5t2wxqwdueecH6SI9B2+W99SanX9qVofr?= =?us-ascii?Q?v22UWxAGTSVl1onfa+DFDnv34xmZjRmVdUJ6NaLl+3mYu92I+zt0iNRbRXrv?= =?us-ascii?Q?Nk2FZChFEQOC3nDP0AY6LTrIPSlQ6LlifocL1bhr/iW24cjjWQAKdWGXhVus?= =?us-ascii?Q?gLSNzKUj61jP/TcCj4mZ8LS03qWN4aBHo2FAcvumQycb9s/9vqlzeFWjfWFn?= =?us-ascii?Q?NsG5hi7iSMs0eihiVKyfbbcaR0BgNn9sE/XJ/uH5ftdoZbLs264oDJJR6uZN?= =?us-ascii?Q?JzT3aGLPAl7i8jOOqnk/xwiVbb+2WxwOpx2h4o6LGyF5kkhg2NPxORqKzf51?= =?us-ascii?Q?lefuGeu3061uqGfFIasxRvbEuSwqYKco8dNKqx89OFqR2MAtfKrDFdrI13Wz?= =?us-ascii?Q?De7Oo7oHNotDVOkcK/1xYqWFstko52YSJR//40WMhcsbl0c7obgR9Cf415LO?= =?us-ascii?Q?ZxX1ZldFcmZysusk62bFDeAL+6OGUSDF48P17IOtrjUSWz5FFD3FB9P0DzVk?= =?us-ascii?Q?GNRwYc51AQUxtUnMewCYD9VRnP2vileqJ8XLg50+P3vj5m5p/7JnCKwAb5qj?= =?us-ascii?Q?BArtm1O/XjBMa4VF53EIZU4RmXuwOxhFQ1uEvEW9WfGhJAQm0ZScp+RnQJZB?= =?us-ascii?Q?gAJUEEJXE+gaFbKFeDYoXtgxcxm8maW0aCq3buX9lbyQR7AAm55FsOH4Qnp+?= =?us-ascii?Q?JDFqK5vT4PzJcKxzwG86FpXL5h6kTb0AXJUjMIScinTK+FwaXh9ugxnjxlHQ?= =?us-ascii?Q?eJ8FjwvQ/raUNe7Et5ljxOwwvmv9g1N6Nga?= X-Microsoft-Exchange-Diagnostics: 1;BN3PR07MB2578;6:C51ZGdaSedJb6BkKcJGJ/TpbUxUidf+vLxyXRZFPpNlypArvsUOWqiN4s7RdRjTBlhwr8yHOCN43RT/zWC7qshKhu0xhRvys8RC+ARPXav7Enxr4HdygXvwzusE/FnzHnq3XPlZv0IW8s3G/yd7SxaIs9U0cB3hLcQZRwTEL23J9dR8eOjM73a/sJhxPYuLwwQarENM7k51c+QS7aK4SBTknwAb7PLAwSxu+APEIjf9P4n9FhjDavObnCW5969ADmU5l39g7VTvVn+n6CMJISNcurD3wnOi8SBHWz0Bb8io=;5:dYNinNSFeoBrZWkP3uMdFfM4UY3CHBcJCCxPovkzJH8BFFWIfT6mBcMkCE1S5YyOOXXxZ6D/ic2fGI2CACbZox2ZfpUUCC+HB3kwk0PD3/OQRmoEcEWqqVFwFe8w8xhP0rIbRMQ6CiwtMXxwCAXfwA==;24:bKl/7TvjFfRos54Gg4zNE6CkL7FdW31XvpVgbtXNNIWQxsnWFJeNKTglri1ANzXN7uzin0VhoRdu+DWmRAX/WcQOUPCs7RCv4kn4uaWPAWQ=;7:oABi+qb5OJG4+60OKrmrh66okqbDGLUyVe2BZ/pStAciLrJGdX+1v6n8Jl20dFAumBnE79m5c0kr2A/dQWX9oYhkyd6ztzmNiOc9G11/+z8P9WURb1+4CCRlLVHYnmdeY6ZBCgAaYLIdu//F/f0ljymLyWYMtseThjFJPmhY7ARJJl4/uAlnUS3idnU5lMaZy2TCYeu9D9S35bmnG7TWRGzWbq+31wwhSfiQt3nIrzq7ML0C9qyRglfH1BKyHbjHl1Lgx7f17fJEVVAOFSmuPU62AY28TU55kVEhbzo1Ge7qMOP5Qn7Tnaf/JilEYhgDzButprlaFx615jviw2PoZg== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2016 15:36:58.5892 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2578 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1512 Lines: 32 On Fri, Oct 28, 2016 at 04:17:49PM +0100, Will Deacon wrote: > On Thu, Oct 20, 2016 at 01:23:51PM +0200, Jan Glauber wrote: > > On Thu, Oct 20, 2016 at 12:37:07PM +0200, Peter Zijlstra wrote: > > > On Thu, Oct 20, 2016 at 11:30:36AM +0200, Jan Glauber wrote: > > > > Note: > > > > I'm using perf_sw_context in difference to perf_invalid_context > > > > (see WARN_ON in perf_pmu_register). Reason is that with perf_invalid_context > > > > add() is never called and the counter results are shown as "unsupported" by > > > > perf. With perf_sw_context everything works as expected. > > > > > > What?! All the uncore PMUs use perf_invalid_context. What doesn't work > > > for you? > > > > OK, so using perf_invalid_context and "-a" seems to work. > > > > But I must say that I hate that from a user perspective. The user needs to know about > > the type of PMU behind the event and then provide "-a" or get a " > as counter value? > > Sure, but in the interest of getting *something* merged, can we start > off using perf_invalid_context and then have the discussion about whether > or not this can be extended later on, please? If your PMU is a shared > resource amongst CPUs, it maybe that all you want is a better error > message from the perf tool (but again, this can come later!). If that is the only obstacle I can repost with perf_sw_context (or do a follow-up patch). After all it works, it is just "clueless" people like me that are not aware of the required switches. --Jan > Will