From patchwork Sun Sep 10 18:58:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Singh Tomar X-Patchwork-Id: 13378547 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 57756EE49A4 for ; Sun, 10 Sep 2023 18:59:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=4+G8GMRDF12tDiZk6NuL8W3Rd6B+qWt0BGlEiRERHXk=; b=Cow/gtBIk0pafh cVg2sdLXwF+BkWEieURItzWRnH+OQZkAHGT3mZYJZlnZ4wWbG8tvz866GjgdO3kw8MIP99JoAu1Pb 5EjDM8tSy8elnDs7qpH6KPtybzePV6qpb/nzZBYsipzkB8oUOhtZbtRvlDtdxC2PcYwh9jLbRi5AE mDFZ7k8ttWJElryBGzw8dEASPFr17zT2Axk2Sc0qFnpJ8edF8uV2L7lpmjDClh/Y+ni3o/ZqGftao rBJHUtjm41W4kb03h0w1lV8elLA95CMJyJLVVgkMJqHQDOWUnSIipa/LP6EZMesBXzM9V+YNPEfgw rZCTNhIWFuH8XgGfZnyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qfPds-00Gpyp-0Y; Sun, 10 Sep 2023 18:58:44 +0000 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qfPdo-00Gpxu-1x for linux-arm-kernel@lists.infradead.org; Sun, 10 Sep 2023 18:58:43 +0000 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38A4gbJJ010905; Sun, 10 Sep 2023 11:58:23 -0700 Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2171.outbound.protection.outlook.com [104.47.55.171]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3t0r7kk679-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 10 Sep 2023 11:58:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gl8xH4CN+wfTUSV2rZ3ccQInRWFnz6I/I01t2dhBG7u0oUc4rQM+OymjudSrF+jEHsSttlh46RVvXT3GELXjRTScMWu7lHdpue0H7Wj6IvAwRbD4Sc7zibEVs1p/H1RR+9n2NnkhRQwCBdkwB7uA11BrE1wM809bOGzZFCu6aDNWpTDQ+2OfC1cqcfjLgTGeKL4jdCVEYF1lKa1/VRidwmX3DRazlXRyfFUdlqHvgM3l2nSmWk96ZPMgghUZiQdtHM9NETR7bCzTXmegWnz4/qfPJfutRh8NmtS2/JLi5yPXOlYa7DvMK2dUexbLfS12kVUtcCbLxE+ejwXy4jYmTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=spEXSFT/3MT7ILJ2ovdJR0PtkU0cD5C0Y1knAVvchkA=; b=dBErP5NynrT7L9NUI1kYY/UHn9nIo+K3YsS9hZN8Ofu9JeKAApRvnSowR5jxpLTcR8nMMVp3Kr6fUI4o7BG0Je2ZeRXoVkaHUcCtrcecQE6Utu/7N2YS/e8ZqoICdZdIoPrnv3As2MLtADGOqLcEfiaodo1dTqLa41yZ1K1vsIWjrwEw9pAj5F1k4BWnz10VZsbm0Sie9r8QVrFSPBI7Az0tVujyQPtvh1qBaCtHCdvVrFPzXGG22is2Q/LIYzYsf2164gLri4sT0VM/YIAFUWnHpNI+y5MVd/7Wx7Hd31kfM6uP7tSkp6Z1pyRz3bEZ0EzsRVAVy9N0jTfMgbwQAA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=spEXSFT/3MT7ILJ2ovdJR0PtkU0cD5C0Y1knAVvchkA=; b=mAAnzY2+PKOMdxxXl1YWvKljxq6fhmdkg1xMiIc6iUYU3W6IiMxkebuJsG899fB87ZAsEDgF37ABLdOvXLLqKxG6p24hppLHwgaDySCE6HYp9T+oycudW0Vx9PCSLg+xz4yUbglvQNyAqvtHcjZ5S2Us+MM/0RTrvFU54QdxPLs= Received: from MW4PR18MB5084.namprd18.prod.outlook.com (2603:10b6:303:1a7::8) by PH7PR18MB5156.namprd18.prod.outlook.com (2603:10b6:510:15b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.30; Sun, 10 Sep 2023 18:58:18 +0000 Received: from MW4PR18MB5084.namprd18.prod.outlook.com ([fe80::3e51:51f3:34c:c6e8]) by MW4PR18MB5084.namprd18.prod.outlook.com ([fe80::3e51:51f3:34c:c6e8%5]) with mapi id 15.20.6768.029; Sun, 10 Sep 2023 18:58:18 +0000 From: Amit Singh Tomar To: "james.morse@arm.com" CC: "Luck, Tony" , Reinette Chatre , "jonathan.cameron@huawei.com" , "carl@os.amperecomputing.com" , "Yu, Fenghua" , George Cherian , "peternewman@google.com" , "linux-arm-kernel@lists.infradead.org" , "rohit.mathew@arm.com" Subject: Testing DDR MPAM monitor (mbm_total_bytes) Thread-Topic: Testing DDR MPAM monitor (mbm_total_bytes) Thread-Index: AdnkE3YAHPR8BwlTQjq4MhSWGk5ejw== Date: Sun, 10 Sep 2023 18:58:18 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-dg-ref: PG1ldGE+PGF0IG5tPSJib2R5LnR4dCIgcD0iYzpcdXNlcnNcYW1pdHNpbmdodFxhcHBkYXRhXHJvYW1pbmdcMDlkODQ5YjYtMzJkMy00YTQwLTg1ZWUtNmI4NGJhMjllMzViXG1zZ3NcbXNnLWZlOThlMzM5LTUwMGItMTFlZS1iNzJhLTFjYzEwYzQ3MmM3Y1xhbWUtdGVzdFxmZTk4ZTMzYS01MDBiLTExZWUtYjcyYS0xY2MxMGM0NzJjN2Nib2R5LnR4dCIgc3o9IjE0MzkxIiB0PSIxMzMzODg0NTg5NTMxMjE5MzgiIGg9ImQwbEpQNExpNWlGNkQ2cUEvYm1Gak9rQm5Pcz0iIGlkPSIiIGJsPSIwIiBibz0iMSIgY2k9ImNBQUFBRVJIVTFSU1JVRk5DZ1VBQU40UEFBQ1NvQW5CR09UWkFkcHRUL3NSQ0EzOTJtMVAreEVJRGYwWkFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFIQUFBQUJ1RHdBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFFQUFRRUJBQUFBOVJlbkx3Q0FBUUFBQUFBQUFBQUFBSjRBQUFCaEFHUUFaQUJ5QUdVQWN3QnpBQUFBQUFBQUFBQUFBQU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am-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: qHi4uKo3bAiVvkDWU27bYsHeM8fC7axFUeWcziQyQVOdyu8A1hP+hXV7cft8eCFToChJHGDIGiLfZSAJUS+x0xDw2KxVU/mJjo8uTJNly80k4oJ0S82+CvQ6iimn6iEEHa+MeWsPgJm11wtFi0cuwC4TKt+0spRt9x8FTP/AIvz8J1MDDuC/5735iqZlbDs0qRdPOleR9M6b4ObqCxI6Y82WpvZm8p5y6w3nE+S9b5L2Iq25CeOvsWK5oWg8g5MpY68aoZcl+gwGMTYRSiCG0kt2gywvC9cq4JUStV8aM/+fhqW5KGn2Re93Y1VR3/My/Yhy3DV3IKkpVN80cUK1dX3L66ngGKvOX08f/BffLIvdzZ6tUx8KHyeXH7+FKoeSlTB+1yZi+3lsiULgHvPyoNDCXVhXMECGCfaVnM0wQ3U4B4zKPZGIU47UA5C3GjRcR+/Sp870WpsvqVxeIPGnuhWArRSLmD5UMCsny7ShCF0Bg1OCf7/HAKoo6702s4ZQ7B95pY6NNzFP84Cbq9zBpYpOrIdSRo5aSHQxTWFTLRAhKIU1Uy0oyeLF82S/0qMAeBvtcOUJ/9PvQrIgV6Q6Geaxp7+5gweMDKhWj2XWuH5ve3v6ImACaHBIXTygolN8pqcolMUVS0BRDyVyOL5Ypg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR18MB5084.namprd18.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(376002)(396003)(346002)(366004)(39850400004)(1800799009)(451199024)(186009)(2906002)(30864003)(38070700005)(38100700002)(33656002)(86362001)(122000001)(55016003)(41300700001)(966005)(9686003)(76116006)(66946007)(66446008)(64756008)(66556008)(66476007)(478600001)(6916009)(54906003)(316002)(8676002)(8936002)(4326008)(45080400002)(6506007)(7696005)(71200400001)(83380400001)(5660300002)(26005)(52536014);DIR:OUT;SFP:1101; x-ms-exchange-antispam-mess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Ym37Rr5QO8v7lb5lbXV0SWzGyJQdxYSHZZ/65E8sJfzgduYkcnLqc4SxGaXfNKXKrBkCM9rtMQwpeIrYtw511zkf1cAF770ewq/+gJkn7PrOL4Kw/GdMxBBsdaNONsLmEqm7qeeMbkYE2nOqTNB/7fYX222ijdK/tRIqGv1PDjgaRcZKEUP++5rTfBIH3ZGyKQsy1+f6xQJQqBQB17vHlaJj5h8C9W0oWzyQb8HQ6N+rEYsCYOL3NM2RiIU7ke8tlqVNjv6n0ci7FEgO58vDvMHVBB02wof9ptsq2gYATLptYdw0RFGfdOLBOhPuwUvS1WwPjbMNLS+3weIFt7RWR2CG3YQL8U/KQGftncchkV4fGRqHbAJNcIbZR+pm1QqTOo5z/ss9mlh5D/5g0GFhpfrE8a0ltisTyVpI2qLGT/+zweX0MhkoGsllCfOjK9i9wWICGJ+8jVn4rDLw1Wga/dmkgc9jglqYjqw8LhUq2/suO1bzaFF3DZn5QexHoH4cnVGs2YXhiZ0Hqd4R+EMqeCEt7RJDMBD4 MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR18MB5084.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0a3c8b86-99fe-4bf3-0ece-08dbb22fe538 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Sep 2023 18:58:18.1692 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 8etn6Z/A1k/pOx+b1AG/fIuWzpDs0eo2PAUxdVOEN1peynFuNNvBzpQThj4CAKIqG83zzjSiCATxvRpjCLZgIA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR18MB5156 X-Proofpoint-GUID: WlPYyd90lTX9o1GVtW7iFJapmNCvPlq8 X-Proofpoint-ORIG-GUID: WlPYyd90lTX9o1GVtW7iFJapmNCvPlq8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-10_13,2023-09-05_01,2023-05-22_02 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230910_115840_815961_848CB74B X-CRM114-Status: UNSURE ( 4.31 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi James, We have two types of MSC's: 1 ) L3 MSC with controls/features: "mpam_feat_cpor_part", and "mpam_feat_msmon_csu", 2) DDR MSC with controls/features: "mpam_feat_mbw_min", "mpam_feat_mbw_max", "mpam_feat_msmon_mbwu", "mpam_feat_msmon_mbwu_63counter", and "mpam_feat_msmon_mbwu_rwbw". Trying to test DDR MPAM monitors (under DDR MSC mapped to mpam_feat_msmon_mbwu feature) using your latest snapshot[1] (mpam/snapshot/v6.5-rc1) but found few issues. 1) When try to mount the resource control, seeing the following stack trace: root@localhost:~# mount -t resctrl resctrl -o this_is_not_abi /sys/fs/resctrl mount: /sys/fs/resctrl: permission denied. root@localhost:~# dmesg | tail -33 [ 36.719569] ------------[ cut here ]------------ [ 36.719571] WARNING: CPU: 23 PID: 786 at fs/resctrl/rdtgroup.c:3109 mkdir_mondata_subdir+0x214/0x228 [ 36.719579] Modules linked in: [ 36.719580] CPU: 23 PID: 786 Comm: mount Not tainted 6.5.0-rc1-g9f0a8101361c-dirty #2 [ 36.719582] Hardware name: Marvell SP1W5NXX board (DT) [ 36.719582] pstate: 63400009 (nZCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) [ 36.719584] pc : mkdir_mondata_subdir+0x214/0x228 [ 36.719586] lr : mkdir_mondata_subdir+0x90/0x228 [ 36.719588] sp : ffff800082d73b00 [ 36.719589] x29: ffff800082d73b10 x28: ffff00011dc1bc00 x27: 0000000000000000 [ 36.719591] x26: ffffa9a19cbe5388 x25: ffffa9a19cba5880 x24: ffff000103364008 [ 36.719593] x23: ffffa9a19cbe5320 x22: ffff00010675c280 x21: ffff00010675c480 [ 36.719594] x20: 000000000675c480 x19: ffff00010675c280 x18: 0000000000000030 [ 36.719596] x17: 0000000000000000 x16: 0000000000000000 x15: ffffffffffffffff [ 36.719598] x14: ffff800102d73bb7 x13: 0000000000000002 x12: ffff800082d73bc0 [ 36.719599] x11: 0000000000000001 x10: 000000000000005f x9 : 0000000000000001 [ 36.719601] x8 : 0101010101010101 x7 : ffff7f7f7fff7f7f x6 : fefdff0005c7ff2f [ 36.719603] x5 : 0000800000008000 x4 : 0000000000000006 x3 : 0000000000000000 [ 36.719604] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffffa9a19cbe5388 [ 36.719606] Call trace: [ 36.719607] mkdir_mondata_subdir+0x214/0x228 [ 36.719609] mkdir_mondata_all+0xb0/0x110 [ 36.719612] rdt_get_tree+0x218/0x500 [ 36.719614] vfs_get_tree+0x28/0xec [ 36.719616] path_mount+0x3d4/0xa4c [ 36.719618] __arm64_sys_mount+0x1d4/0x2b0 [ 36.719619] invoke_syscall+0x48/0x114 [ 36.719622] el0_svc_common.constprop.0+0x44/0xe4 [ 36.719625] do_el0_svc+0x38/0xa4 [ 36.719627] el0_svc+0x2c/0x84 [ 36.719630] el0t_64_sync_handler+0xc0/0xc4 [ 36.719632] el0t_64_sync+0x190/0x194 [ 36.719633] ---[ end trace 0000000000000000 ]--- It is due to the fact the event list for MBA resource is empty [1] (event list is created only for L3 resource), and we hit here: https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/tree/fs/resctrl/rdtgroup.c?h=mpam/snapshot/v6.5-rc1#n3109 With the following change, managed to mount the resource control: # git diff fs/resctrl/rdtgroup.c diff --git a/drivers/platform/mpam/mpam_resctrl.c b/drivers/platform/mpam/mpam_resctrl.c index 6e9925fcf934..4d9beed0b6cd 100644 @@ -397,6 +404,13 @@ int resctrl_arch_rmid_read(struct rdt_resource *r, struct rdt_domain *d, u32 mon = *(u32 *)arch_mon_ctx; enum mpam_device_features type; + pr_info("resource name is %s\n", r->name); + pr_info("event id is %x\n", eventid); + pr_info("type set is %x\n", type); + + if (!strcmp(r->name, "L3")) + return 0; + @@ -740,15 +754,23 @@ static void mpam_resctrl_pick_mba(void) bool resctrl_arch_is_evt_configurable(enum resctrl_event_id evt) { + struct mpam_props *cprops; + switch (evt) { case QOS_L3_MBM_LOCAL_EVENT_ID: - struct mpam_props *cprops; - if (!mbm_local_class) dom = container_of(d, struct mpam_resctrl_dom, resctrl_dom); @@ -740,15 +754,23 @@ static void mpam_resctrl_pick_mba(void) bool resctrl_arch_is_evt_configurable(enum resctrl_event_id evt) { + struct mpam_props *cprops; + switch (evt) { case QOS_L3_MBM_LOCAL_EVENT_ID: - struct mpam_props *cprops; - if (!mbm_local_class) return false; cprops = &mbm_local_class->props; return mpam_has_feature(mpam_feat_msmon_mbwu_rwbw, cprops); + case QOS_L3_MBM_TOTAL_EVENT_ID: + if (!mbm_total_class) + return false; + + cprops = &mbm_total_class->props; + pr_info("total_cprops feature is %x\n", cprops->features); + + return mpam_has_feature(mpam_feat_msmon_mbwu_rwbw, cprops); default: return false; } At the moment, not really sure how to get it working properly when DDR MPAM monitors (enumerated as part of DDR MSC) is coupled with L3 resource, .i.e. "MBM events are also part of RDT_RESOURCE_L3 resource because as per the SDM the total and local memory bandwidth are enumerated as part of L3 monitoring" Thanks -Amit P.S: We posted this RFC[3] earlier that demonstrates DDR MPAM monitors working (decoupled it from L3 resource). [1]: https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/tree/fs/resctrl/monitor.c?h=mpam/snapshot/v6.5-rc1#n799 [2]: https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/tree/drivers/platform/mpam/mpam_devices.c?h=mpam/snapshot/v6.5-rc1#n1004 [3]: https://lore.kernel.org/linux-arm-kernel/20230308134539.3071034-2-amitsinght@marvell.com/T/ diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c index 43efed317f1b..655757183b84 100644 --- a/fs/resctrl/rdtgroup.c +++ b/fs/resctrl/rdtgroup.c @@ -3096,6 +3096,9 @@ static int mkdir_mondata_subdir(struct kernfs_node *parent_kn, char name[32]; int ret; + if (!strcmp(r->name, "MB")) + return 0; + sprintf(name, "mon_%s_%02d", r->name, d->id); /* create the directory */ kn = kernfs_create_dir(parent_kn, name, parent_kn->mode, prgrp); and seeing mbm_total_bytes populated under mon_data. root@localhost:/sys/fs/resctrl# ls mon_data/mon_L3_00/ llc_occupancy mbm_total_bytes 2). Other issue I see is, when we try to read BW monitors using perf tool root@localhost:/sys/fs/resctrl# perf stat -e resctrl_pmu/mbm_total_bytes,resctrl_id=0x7eb0c51a2bebc62b/ bw_mem -P 80 1G bzero; [ 72.926508] Unable to handle kernel paging request at virtual address ffffffff83cac910 [ 72.934432] Mem abort info: [ 72.937217] ESR = 0x0000000096000004 [ 72.940961] EC = 0x25: DABT (current EL), IL = 32 bits [ 72.946266] SET = 0, FnV = 0 [ 72.949311] EA = 0, S1PTW = 0 [ 72.952443] FSC = 0x04: level 0 translation fault [ 72.957313] Data abort info: [ 72.960186] ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 [ 72.965663] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 72.970707] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 72.976012] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000021c7f000 [ 72.982706] [ffffffff83cac910] pgd=0000000000000000, p4d=0000000000000000 [ 72.989489] Internal error: Oops: 0000000096000004 [#2] PREEMPT SMP [ 72.995748] Modules linked in: [ 72.998794] CPU: 72 PID: 800 Comm: perf Tainted: G D 6.5.0-rc1-g9f0a8101361c-dirty #4 [ 73.008007] Hardware name: Marvell SP1W5NXX board (DT) [ 73.013137] pstate: 83400009 (Nzcv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) [ 73.020090] pc : resctrl_arch_mon_ctx_free+0x10/0xd8 [ 73.025049] lr : resctrl_pmu_event_destroy+0x3c/0x4c [ 73.030005] sp : ffff800082e6bbb0 [ 73.033310] x29: ffff800082e6bbb0 x28: ffffcc4d83949000 x27: 0000000000000000 [ 73.040439] x26: ffff00011d948420 x25: ffff00011d948420 x24: ffffcc4d83d8c4c8 [ 73.047569] x23: 0000000000000000 x22: 0000000000000000 x21: 00000000ffffffea [ 73.054697] x20: 0000000000000002 x19: ffff00011d948420 x18: 0000000000000000 [ 73.061827] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 [ 73.068955] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000040 [ 73.076084] x11: ffff000100400b68 x10: ffff000100400b6a x9 : ffffcc4d83d8c4d0 [ 73.083212] x8 : ffff000100400b90 x7 : 0000000000000000 x6 : ffff000100400bc8 [ 73.090341] x5 : ffff00011d36bc00 x4 : ffff800082e6bb50 x3 : 0000000000000000 [ 73.097469] x2 : ffffffff83cac910 x1 : 0000000000000002 x0 : ffffcc4d83de5200 [ 73.104598] Call trace: [ 73.107037] resctrl_arch_mon_ctx_free+0x10/0xd8 [ 73.111646] resctrl_pmu_event_destroy+0x3c/0x4c [ 73.116254] perf_try_init_event+0x11c/0x138 [ 73.120517] perf_event_alloc+0x354/0xea4 [ 73.124518] __do_sys_perf_event_open+0x174/0xab0 [ 73.129214] __arm64_sys_perf_event_open+0x28/0x34 [ 73.133996] invoke_syscall+0x48/0x114 [ 73.137737] el0_svc_common.constprop.0+0x44/0xe4 [ 73.142433] do_el0_svc+0x38/0xa4 [ 73.145741] el0_svc+0x2c/0x84 [ 73.148787] el0t_64_sync_handler+0xc0/0xc4 [ 73.152963] el0t_64_sync+0x190/0x194 [ 73.156617] Code: d503233f a9bd7bfd 910003fd f90013f5 (b9400055) [ 73.162702] ---[ end trace 0000000000000000 ]--- Segmentation fault root@localhost:/sys/fs/resctrl# This is due to pointer assignment issues, can be fixed with following changes: diff --git a/drivers/perf/resctrl_pmu.c b/drivers/perf/resctrl_pmu.c index 99a2b90b5d83..47e41e0f6a03 100644 --- a/drivers/perf/resctrl_pmu.c +++ b/drivers/perf/resctrl_pmu.c diff --git a/drivers/perf/resctrl_pmu.c b/drivers/perf/resctrl_pmu.c index 99a2b90b5d83..47e41e0f6a03 100644 --- a/drivers/perf/resctrl_pmu.c +++ b/drivers/perf/resctrl_pmu.c @@ -74,7 +74,7 @@ static void resctrl_pmu_event_destroy(struct perf_event *event) if (!r) return; - resctrl_arch_mon_ctx_free(r, event_num, hwc->idx); + resctrl_arch_mon_ctx_free(r, event_num, &hwc->idx); } static int resctrl_pmu_event_init(struct perf_event *event) @@ -144,7 +144,7 @@ static int resctrl_pmu_event_init(struct perf_event *event) return -EINVAL; } - hwc->idx = resctrl_arch_mon_ctx_alloc_no_wait(r, event_num); + hwc->idx = *(int *)resctrl_arch_mon_ctx_alloc_no_wait(r, event_num); if (hwc->idx == -ENOSPC) return -ENOSPC; event->destroy = resctrl_pmu_event_destroy; @@ -183,7 +183,7 @@ static void resctrl_pmu_event_update(struct perf_event *event) prev = local64_read(&hwc->prev_count); err = resctrl_arch_rmid_read(r, d, closid, rmid, - event_num, &now, hwc->idx); + event_num, &now, &hwc->idx); if (err) return; 3) Finally, when we try to read the DDR BW monitors, we never hit the right code path related to DDR monitor read, and it is due to the fact that DDR BW monitor is coupled with L3 domain/resource. Only these two features "mpam_feat_cpor_part" and "mpam_feat_msmon_csu" are enumerated for L3 resource class. For instance: root@localhost:~# cd /sys/fs/resctrl/ root@localhost:/sys/fs/resctrl# mkdir p1 [ 61.607361] rdtgroup: XYZZY: Allocated PARTID 1 for ctrl-group 'p1' root@localhost:/sys/fs/resctrl# cd p1/ root@localhost:/sys/fs/resctrl/p1# cat id 0x5cd4f5215e8afd45 root@localhost:/sys/fs/resctrl/p1# perf stat -e resctrl_pmu/mbm_total_bytes,resctrl_id=0x5cd4f5215e8afd45/ bw_mem -P 80 1G bzero; 1000.00 360557.50 Performance counter stats for 'system wide': 0 resctrl_pmu/mbm_total_bytes,resctrl_id=0x5cd4f5215e8afd45/ 37.724019146 seconds time elapsed and read (from Kernel buffer) following in parallel diff --git a/drivers/platform/mpam/mpam_resctrl.c b/drivers/platform/mpam/mpam_resctrl.c index 6e9925fcf934..8903fbdf0242 100644 --- a/drivers/platform/mpam/mpam_resctrl.c +++ b/drivers/platform/mpam/mpam_resctrl.c @@ -413,6 +420,10 @@ int resctrl_arch_rmid_read(struct rdt_resource *r, struct rdt_domain *d, return -EINVAL; } + pr_info("resource name is %s\n", r->name); + pr_info("event id is %x\n", eventid); + pr_info("type set is %x\n", type); + diff --git a/drivers/platform/mpam/mpam_devices.c b/drivers/platform/mpam/mpam_devices.c index aece6cab6506..7f78237a088c 100644 --- a/drivers/platform/mpam/mpam_devices.c +++ b/drivers/platform/mpam/mpam_devices.c @@ -1067,8 +1072,13 @@ int mpam_msmon_read(struct mpam_component *comp, struct mon_cfg *ctx, if (!mpam_is_enabled()) return -EIO; - if (!mpam_has_feature(type, cprops)) + pr_info("type is %x\n", type); + pr_info("class property %x\n", cprops->features); + + if (!mpam_has_feature(type, cprops)) { + pr_info("feature mis-match\n"); return -EOPNOTSUPP; + } [ +0.664539] rdtgroup: XYZZY: Allocated PARTID 1 for ctrl-group 'p1' [ +0.359458] mpam: resctrl: resource name is L3 [ +0.000001] mpam: resctrl: event id is 2 [ +0.000001] mpam: resctrl: type set is d [ +0.000000] mpam: type is d [ +0.000001] mpam: class property 802 (mpam_feat_cpor_part and mpam_feat_msmon_csu which is L3 resources) [ +0.000001] mpam: feature mis-match 4) With the following hacked changes, right code path[2] is hit, and can see prints from[2] diff --git a/drivers/perf/resctrl_pmu.c b/drivers/perf/resctrl_pmu.c index 99a2b90b5d83..d30bcf0a00df 100644 --- a/drivers/perf/resctrl_pmu.c +++ b/drivers/perf/resctrl_pmu.c @@ -57,6 +57,7 @@ static struct rdt_resource *resctrl_event_get_resource(u16 event_num) switch (event_id) { case QOS_L3_OCCUP_EVENT_ID: case QOS_L3_MBM_TOTAL_EVENT_ID: + return resctrl_arch_get_resource(RDT_RESOURCE_MBA); case QOS_L3_MBM_LOCAL_EVENT_ID: return resctrl_arch_get_resource(RDT_RESOURCE_L3); }