Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp213325rbe; Wed, 28 Feb 2024 18:23:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUokXQ+IsZJUC3cmZOa+OpS8/a8nVft/qpqGQ9IA9eRTYAXR+sVr34rQhOkwSAkYcGCzDFspDrRNtsWakBXA8j3z5jPq1Qd8nzoWSPBmg== X-Google-Smtp-Source: AGHT+IFxtQKTzW70TP4eMJ1XeJoLCm7ptN3NxxUrS7baGqcQ/g9DPTNPo3iDMFK3KTa5Dh1ktiJz X-Received: by 2002:a05:6870:2314:b0:21f:f6ce:29e6 with SMTP id w20-20020a056870231400b0021ff6ce29e6mr807842oao.37.1709173427275; Wed, 28 Feb 2024 18:23:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709173427; cv=pass; d=google.com; s=arc-20160816; b=REqE60MdCNOGzVfN0iiljeLWRyTyoVCrMspOMFH7+OAUdbV5LtLggIKiOzZQINu1w6 N+JjNgFBUuy49cYFKb8KE/nqh6EY1ZLpRcA3+4U2gmKpNMel7uPIGkyVKHdCNHeJdGp3 gLpEfYGO5jQaP/CaDvgdgXisS+BCKCFSwjKvzdHHlAsgRS+G5rFKtOqb/QiGZR2HcbZI 6JOfQ/tJkjJMGT7iA7mPQVSeBMlqUfiAkX6ZPnKF7W0Xq5Q8Q2RTWYo/01ZE8uSYLMqr d3gqApN7tLRHZ9ogK8ol2k1yGseeV2GoRLTNEGdTvROR/g8fj5aGqgK9Gh6Kor8SlX8A rDXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id; bh=Sa+7FSBgvK9YOLqfeWKyiwVxTLg2fW7lzSFH/v0j7gQ=; fh=XOTHCGKVIr1rwxxJHjZLZG/l4xIO6T0qGaiVrpUNM9M=; b=BpQdbxcqbmDNU2GX8fnbpSjrLks8gm6HXDWqISw5HDkPFkuy0x5wsC03S/DPzJQ5XO 6mB+DEKC0PsiwsA+hiQRavchfVWLNMh+TrHKWRvixGisJ8u//tD0c7oTl0LY4Etz9ToW hriMRG+SJ3uTt5Vxf9ywufEVlGj2Y7b+QmNnAfZ2XcQ6OOpmabpiro3+G2MAt1z1QeFD DF4zC5RjnzIbKnPdqIfJrVU6rf+nMunzHHewSYuNLWiLqsgdxLILEq3QbR7E5etRwVtQ N5+U1fLqd6Wew8H3BXJ2ELfkjxvbO38Z5uqrOp56G/Psqv9msGzns9jBOU2l7WcKUwZv PLtg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=shingroup.cn dmarc=pass fromdomain=shingroup.cn); spf=pass (google.com: domain of linux-kernel+bounces-86044-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id r3-20020aa78b83000000b006e4e6509ce2si300518pfd.332.2024.02.28.18.23.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 18:23:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86044-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=shingroup.cn dmarc=pass fromdomain=shingroup.cn); spf=pass (google.com: domain of linux-kernel+bounces-86044-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id F099E2884C9 for ; Thu, 29 Feb 2024 02:23:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6FCB736B01; Thu, 29 Feb 2024 02:23:40 +0000 (UTC) Received: from bg1.exmail.qq.com (bg1.exmail.qq.com [114.132.65.219]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 24B6F3613E for ; Thu, 29 Feb 2024 02:23:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=114.132.65.219 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709173420; cv=none; b=In/JZG+1dHoBSl0YLmr7p8Gqly0BoVEWsYieyT1en7RUb9iY5CXKAYQj6zL8Aa/kUjPKMP0BceiBtQw39KT+gr5qX5MaSxTL/KoKVZppZhNoKgRc7UE9rJmnKmTFoP1+x9BkaMRRc2NArCdLxMygxVmNhi6hMKnloSXomzHtxkA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709173420; c=relaxed/simple; bh=+pngFm5dnLHfhdx03c9yhljFk/yn45ERTQuOmZoOVF8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=fF60io70NzhX1Gho2CAvnGgFwuzrMkrp+1iywAUQjRECUWmN4ujxxVQP66KF4H4RkomqAKfyNT204hp4/B6YwnvjRP4uOzDzJabcIEngUwiIhon7Dja2jH0nmY2gwEEW1tY7RWkBHptI2h1dxTGLqn2rzfTSAOlNv8tboEffMoI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shingroup.cn; spf=pass smtp.mailfrom=shingroup.cn; arc=none smtp.client-ip=114.132.65.219 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shingroup.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shingroup.cn X-QQ-mid: bizesmtp86t1709173353tkzh1zrq X-QQ-Originating-IP: uLYAUNIxTNxwdy+T1q1N6NYyqDLwHqPl6B9wtRt0oiA= Received: from [127.0.0.1] ( [223.112.234.130]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 29 Feb 2024 10:22:32 +0800 (CST) X-QQ-SSF: 00400000000000B0B000000A0000000 X-QQ-FEAT: CR3LFp2JE4mL/5mvuvva9dMAnSISHqNZb1uQ5lc4/1uAWKIky6H8Jnbby98P2 qSyZMBwuI2mXziX9rU5UKG0MLvCUkXNumQjuZBQfNuL9fJZqF1qOdT4/B54Kxdb9DFJonN7 LFwt8A+s1XBkmSMujj8aLBTk7yDq73B8AfdAmrP/iwMLdRL4Sd9xPBtgW0lziSz3jv3dS2x imAeueIP9+NBXxV8CUm3aaRNWF5xwhQLDueNMSc/aXBJsIpoJwgowgsqxBES0VSzwgaI47S +a/pK+9z+Q/j+3rIqZDW+LDs/K7YXliRJq3Zkzf+/qtohn+QywfzdZo4Zmxjskdjv3Z5FVk mMqKHp3JflMbWtF23d4K94tCkWuGTlvYFTs7bWaCEhECiX3sAX0etvJkKm9rk3N5ZRbhS4j X-QQ-GoodBg: 2 X-BIZMAIL-ID: 680634371040173557 Message-ID: Date: Thu, 29 Feb 2024 10:22:31 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] perf/hx_arm_ni: Support uncore ARM NI-700 PMU To: Robin Murphy , Will Deacon , Mark Rutland Cc: shenghui.qu@shingroup.cn, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20240131070821.11477-1-jialong.yang@shingroup.cn> <7C9733413A0F8F60+0214f04d-173d-4513-ac1e-681c2f2a8de4@shingroup.cn> <8daf740f-f16b-49af-8da9-7c7750092539@arm.com> Content-Language: en-US From: =?UTF-8?B?WWFuZyBKaWFsb25nIOadqOS9s+m+mQ==?= In-Reply-To: <8daf740f-f16b-49af-8da9-7c7750092539@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:shingroup.cn:qybglogicsvrgz:qybglogicsvrgz6a-1 在 2024/2/3 4:11, Robin Murphy 写道: > On 2024-02-01 2:40 am, Yang Jialong 杨佳龙 wrote: >> >> >> 在 2024/2/1 0:50, Robin Murphy 写道: >>> On 31/01/2024 7:08 am, JiaLong.Yang wrote: >>>> This code is based on uncore PMUs arm_smmuv3_pmu and arm-cmn. >>>> One ni-700 can have many clock domains. Each of them has only one PMU. >>>> Here one PMU corresponds to one 'struct ni_pmu' instance. >>>> PMU name will be ni_pmu_N_M, which N means different NI-700s and M >>>> means >>>> different PMU in one NI-700. If only one NI-700 found in NI-700, >>>> name will >>>> be ni_pmu_N. >>>> Node interface event name will be xxni_N_eventname, such as >>>> asni_0_rdreq_any. There are many kinds of type of nodes in one clock >>>> domain. Also means that there are many kinds of that in one PMU. So we >>>> distinguish them by xxni string. Besides, maybe there are many nodes >>>> have same type. So we have number N in event name. >>>> By ni_pmu_0_0/asni_0_rdreq_any/, we can pinpoint accurate bus traffic. >>>> Example1: perf stat -a -e >>>> ni_pmu_0_0/asni_0_rdreq_any/,ni_pmu_0_0/cycles/ >>>> EXample2: perf stat -a -e ni_pmu_0_0/asni,id=0,event=0x0/ >>> >>> Oh! I've had a driver for this thing sat around for ages waiting to >>> find someone with an interest in testing it. Given that from a quick >>> skim of this patch I'd also have several concerns with this >>> implementation, may I ask that you have a look at my branch and see >>> if it works for you? >> >> If permission I will test. > > Thanks! I see you've also tried to support having the IRQs combined > together - does your platform need that right away? That's another thing > I've been anticipating but haven't got round to wiring up yet (it's a > bit more fiddly than just IRQF_SHARED since perf has some expectations > around affinity to event->cpu), but I can have a go at getting it done. > I have not seen the expectations. I will study it. >>> >>> https://gitlab.arm.com/linux-arm/linux-rm/-/tree/ni-dev?ref_type=heads >>> >>> In particular, after the pain of maintaining event aliases in arm-cmn >>> I'd really like to get away from doing that again and instead move >>> over to jevents this time (especially now that system PMU support is >>> a bit more developed there) - I just haven't yet got round to hooking >>> up the identifier and writing the JSON files, since it hasn't seemed >>> like much of a priority before I know whether the code even works. >>> >> >> It's a useful way. >> Uncore PMU is increasing. Not only CPU event can be writen in jevents. >> I have not considered it when writing code in a low version. >> >> Finally, I have opened a case in arm suppport for linux ni pmu driver. >> They tell me no driver. > > Oh dear, sorry about that - I'd have hoped that a question about a Linux > PMU driver might have found its way to our team, even if they weren't > aware that NI-700 has already been a specific item on our roadmap for > some time :( > > Thanks, > Robin. > I have run the code and thanks to the support of shenghui.qu@shingroup.cn. It's sorry for the late.