Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp33571lqh; Mon, 6 May 2024 10:18:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUjc7eZdCGZnfv+h+c3pwR1iN/fJvWcKN+MYMGms/Zl466awe4qFE/bDwedtM+2s6dTVTEaSZWHHrfZmTtfuzfdKTE5ScZxwvVZZDvi2A== X-Google-Smtp-Source: AGHT+IH84nwY1crIBOpdV9xGWhOjZhSxLUCxhD2AIgjWAaxFSG/CpsUrT7EXIKzJMTUGnQDQvrKw X-Received: by 2002:a05:6870:c107:b0:233:2f5f:9e1 with SMTP id f7-20020a056870c10700b002332f5f09e1mr12350781oad.54.1715015925068; Mon, 06 May 2024 10:18:45 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id lr46-20020a056a0073ae00b006ed1d8b5dbbsi8299909pfb.110.2024.05.06.10.18.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 10:18:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170223-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=3422YUNq; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-170223-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170223-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id BE3A0B21CD8 for ; Mon, 6 May 2024 17:18:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 887AE15747A; Mon, 6 May 2024 17:18:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="3422YUNq" Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2085.outbound.protection.outlook.com [40.107.94.85]) (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 0B750157463; Mon, 6 May 2024 17:18:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.85 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715015911; cv=fail; b=fsfkfSIZ5DI080KJkLuojMKsIxg8IZDqce+/vcIwICENhxIxzNnkV2XM1mO5oSrNHqnQeMYpTaxr7fZa3V+Q5XVyxH9dyS3ozepNwV/kyKUgdkUPJaTHDpoWjTreGmA0AboIYHvpqwawr404/13vpK+Z7QuRA6afZLlyB1tg25s= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715015911; c=relaxed/simple; bh=RTGYhv2EPXYcPoJq/yyQ8aBd87elbB4ixXaU9Cm5igs=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=jnvYpl69BEAhk/swssDMEpNHWXRc3H5DjhCErA9snlz6HxsTobCA0P2Wd9lPmoQ5FsLBJhvVG3D8UYK75JkCSHTrbIB/IlKuiYDrctETp0fnSqtB0ZrfkuUXXrRvB3Ux+RWx2h3P1719LlleC2NVVQEABQ+hoZ8trye/h4KUJv0= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=3422YUNq; arc=fail smtp.client-ip=40.107.94.85 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k787H4c5UFmafag+Sm549ycNfEq1f7aZtiFuOckE2gtii5mkJ/AiqkRPKzcLBC6uU7M03j3ptaCwlNYdPlKgJ5SWoHBtjkXXiEH7cn8dAqwf01lBGbmZPaV87emFhsk677Vi/uA2VP29RCFbrx3hjmMOx+Hre43sj5vLRrgzm1Skn1iy60qUm9CXgQwz8ZmbijoOKrj0zc8kR0GOSc5chSn98U5igJaU69KSle0TAdwlafpWisZ0KvkiR4gZz60t8rDYIxeRS/FlE2ttlgO3BQHALmrTovw3xL9K4+S9E+qPZnSyPaoaS8EONVy7+WXdBFqlzARxQvI6t9V+PhO57A== 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=oyN48cIDS4G2aONwtuU7A54YeY9eG1ffJS1tcUWka0g=; b=YHWQhIK0AF3oKGZri3a0kdGveXe23oEfVxIVYEaO2RHSA1CfZ9FllPhCVegtjNrrfc+IUNJMPzmWUM5WjFOPxYdFAUEYZs6Whr1xzXAWApfUxar9Xq2mRqxUmu/1XGFjaVTBtxCpwwpsk2TTCZgPBO6HfspKS5Hw34ioI6EHc78uI/0rJkyDHTbCKs+l7K8yeb0P7KLbxjzvQrsFsBc4lMVaAN6sTclyPTegnTDvQCv5C/pT36/TE0sFRULna1Rz3UrnlGNJf+8y4mSb7ZiAAvHjN9uUFD7h7paMxPiQ+o6Sw+LhiZnfp3od/ZnNMZ9kVpxl+T3K0OcVh31sBVQmyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oyN48cIDS4G2aONwtuU7A54YeY9eG1ffJS1tcUWka0g=; b=3422YUNqz3DHMPWf3SxiZfcfhRxfg95yW8Ht3h2ljaQdRWb/82QTFxvatYJ/bf3kt53YhhjWpy8qydNITR6XNJiaWfShaTlr0h0L2KElgXqy3GaZYqObAtPUzLOXNhGqoUJA7XrizlphPtqQRMejhayiCNe5WOuwA0NrELBt1kQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MW3PR12MB4553.namprd12.prod.outlook.com (2603:10b6:303:2c::19) by IA1PR12MB7733.namprd12.prod.outlook.com (2603:10b6:208:423::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.42; Mon, 6 May 2024 17:18:24 +0000 Received: from MW3PR12MB4553.namprd12.prod.outlook.com ([fe80::b0ef:2936:fec1:3a87]) by MW3PR12MB4553.namprd12.prod.outlook.com ([fe80::b0ef:2936:fec1:3a87%4]) with mapi id 15.20.7544.041; Mon, 6 May 2024 17:18:24 +0000 Message-ID: <2016b830-64c7-43bd-8116-bdfd239221e3@amd.com> Date: Mon, 6 May 2024 12:18:19 -0500 User-Agent: Mozilla Thunderbird Reply-To: babu.moger@amd.com Subject: Re: [RFC PATCH v3 00/17] x86/resctrl : Support AMD Assignable Bandwidth Monitoring Counters (ABMC) To: Reinette Chatre , corbet@lwn.net, fenghua.yu@intel.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com Cc: x86@kernel.org, hpa@zytor.com, paulmck@kernel.org, rdunlap@infradead.org, tj@kernel.org, peterz@infradead.org, yanjiewtw@gmail.com, kim.phillips@amd.com, lukas.bulwahn@gmail.com, seanjc@google.com, jmattson@google.com, leitao@debian.org, jpoimboe@kernel.org, rick.p.edgecombe@intel.com, kirill.shutemov@linux.intel.com, jithu.joseph@intel.com, kai.huang@intel.com, kan.liang@linux.intel.com, daniel.sneddon@linux.intel.com, pbonzini@redhat.com, sandipan.das@amd.com, ilpo.jarvinen@linux.intel.com, peternewman@google.com, maciej.wieczor-retman@intel.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, eranian@google.com, james.morse@arm.com References: <48b595cc-5ffe-4507-bffd-335a60fdaab9@intel.com> Content-Language: en-US From: "Moger, Babu" In-Reply-To: <48b595cc-5ffe-4507-bffd-335a60fdaab9@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DS7PR03CA0116.namprd03.prod.outlook.com (2603:10b6:5:3b7::31) To MW3PR12MB4553.namprd12.prod.outlook.com (2603:10b6:303:2c::19) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW3PR12MB4553:EE_|IA1PR12MB7733:EE_ X-MS-Office365-Filtering-Correlation-Id: 15184256-e6fa-4c07-3c0d-08dc6df0895d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|7416005|366007|376005; X-Microsoft-Antispam-Message-Info: =?utf-8?B?amJET243cDFuWFp1dHd6dW5uQTBzS0I3a0h6KzBaZFBOenRibUFjbGY0L04x?= =?utf-8?B?akg4T2krRWs4TERIQWgrZGkxNVplL2lFelJ1VzZrNFNJMHd0dlhaaXRzdzc5?= =?utf-8?B?STIwWWppbEJVblBHVWRPMUxCTk0yd3BObE5JYlRrN3NhKzd6eXova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vdkQza05nK3RGbTE0bEtkblBiZ2VZWTdI?= =?utf-8?B?ZmtiTkhGL3lMMnBVWCtHNC9PTWU0NnJteHY2bjFROEVkeGkwcjJ2OHFzajl0?= =?utf-8?B?aytWWG95dU40cHdqRXowWGVIQ0FxL3BkQTlyMVYyMTFkbEQyVUNlTUtTeVdV?= =?utf-8?B?ckpmSnl2ZDhidWJ0Vm1QdDVDU1cwVWI2Yjk2MDVzeGJqWkxjbTdJSnByeTNR?= =?utf-8?B?VldZazkyZkhyeU5Jeld0S0JwL01ZNWtIZXVOcVl3VVY2c0VGekhDSzg5REVV?= =?utf-8?B?OENWWFNnekQyUmlrZXhjUkpNMXdsVWYwaTErL3BwOFR4T1Fkc1VqZnhJcnF5?= =?utf-8?B?MTVUOGVNSWt5UlFHRjZNbGl3dnJVOEhZenZRbEhuUllscHdacmU4ZjZBMGlD?= =?utf-8?B?T2tDY1owN1VDOTRnRWZSelVmMWJlYXRVaFh3MWk3ajJlNS8ybmR5aTVsY1k0?= =?utf-8?B?aFNMRFR0Yy9ObnVzZnNjSEFSb1JFK2IxMm5BU0ZlOStCRTZIU2FJcDV0WHBM?= =?utf-8?B?R0JNL2E2WVU2LzQzREk4Y2daR1ZSTlFCVmZIZ3c2dDJRdjBKRjUwcGJ0cDY5?= =?utf-8?Q?3ZqUObwviUJ3sI0mm5cX3XRMLgcw454uyG+kCfyH8WE0=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW3PR12MB4553.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(7416005)(366007)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TlhVUjYrRlIwdUZ5MldJTnh0cVBXT3VoR1Y1S3RWMitqdHhGTXdTWVp6WDB0?= =?utf-8?B?MkhmOGU2SE03WkR6UDlU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WkNSK1A2NHM0bVZWbS9XM2x0OFA4TE5XOTBGeWVYbUxvWlV4VU5kV3AxYkxj?= =?utf-8?B?VFJtSGd3MUprVThNZmJvQ0o2VURkbGdGQi9OdHlGczNvTTNIeG8xNlBDY0JM?= =?utf-8?B?Nnk3WEYxYUR5RVdNSzdsWThkaTRWTHFHcWhEby9sb2xKYjNvTXA3eUxISkts?= =?utf-8?B?c1owVTc0ZkZ6QVNYL1VPdHRDcFhwL1o3TkgyTnpuZjd2bTAzaTduMGFhWUpP?= =?utf-8?Q?Nmq8=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 15184256-e6fa-4c07-3c0d-08dc6df0895d X-MS-Exchange-CrossTenant-AuthSource: MW3PR12MB4553.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 17:18:24.5834 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3ybudM9c2iElfh8vPgfA/BLgrEFXXYC0dBUh6ie+XKv6TtRzfhdDLClQVh+o1IaO X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7733 Hi Reinette, On 5/3/24 18:24, Reinette Chatre wrote: > Hi Babu, > > On 3/28/2024 6:06 PM, Babu Moger wrote: > >> a. Check if ABMC support is available >> #mount -t resctrl resctrl /sys/fs/resctrl/ >> >> #cat /sys/fs/resctrl/info/L3_MON/mbm_assign >> [abmc] >> legacy_mbm >> >> Linux kernel detected ABMC feature and it is enabled. > > Please note that this adds the "abmc" feature to the resctrl > *filesystem* that supports more architectures than just AMD. Calling the > resctrl filesystem feature "abmc" means that (a) AMD needs to be ok with > other architectures calling their features that are > similar-but-maybe-not-identical-to-AMD-ABMC "abmc", or (b) this needs > a new generic name. It should not a problem if other architecture calling abmc for similar feature. But generic name is always better if there is a suggestion. > >> b. Check how many ABMC counters are available. >> >> #cat /sys/fs/resctrl/info/L3_MON/mbm_assign_cntrs >> 32 >> >> c. Create few resctrl groups. >> >> # mkdir /sys/fs/resctrl/mon_groups/default_mon1 >> # mkdir /sys/fs/resctrl/non_defult_group > > Can this be non_default_group instead? Seems like non_defult_group is used > consistently but its spelling is unexpected. Ok. Will correct it. Thanks > >> # mkdir /sys/fs/resctrl/non_defult_group/mon_groups/non_default_mon1 >> >> d. This series adds a new interface file /sys/fs/resctrl/info/L3_MON/mbm_assign_control >> to list and modify the group's assignment states. >> >> The list follows the following format: >> >> * Default CTRL_MON group: >> "//=" >> >> * Non-default CTRL_MON group: >> "//=" >> >> * Child MON group of default CTRL_MON group: >> "//=" >> >> * Child MON group of non-default CTRL_MON group: >> "//=" >> >> Assignment flags can be one of the following: >> >> t MBM total event is assigned >> l MBM local event is assigned >> tl Both total and local MBM events are assigned >> _ None of the MBM events are assigned >> >> Examples: >> >> # cat /sys/fs/resctrl/info/L3_MON/mbm_assign_control >> non_defult_group//0=tl;1=tl;2=tl;3=tl;4=tl;5=tl;6=tl;7=tl; >> non_defult_group/non_default_mon1/0=tl;1=tl;2=tl;3=tl;4=tl;5=tl;6=tl;7=tl; >> //0=tl;1=tl;2=tl;3=tl;4=tl;5=tl;6=tl;7=tl; >> /default_mon1/0=tl;1=tl;2=tl;3=tl;4=tl;5=tl;6=tl;7=tl; >> >> There are four groups and all the groups have local and total event assigned. >> >> "//" - This is a default CONTROL MON group >> >> "non_defult_group//" - This is non default CONTROL MON group >> >> "/default_mon1/" - This is Child MON group of the defult group >> >> "non_defult_group/non_default_mon1/" - This is child MON group of the non default group >> >> =tl means both total and local events are assigned. >> >> e. Update the group assignment states using the interface file /sys/fs/resctrl/info/L3_MON/mbm_assign_control. >> >> The write format is similar to the above list format with addition of >> op-code for the assignment operation. >> >> * Default CTRL_MON group: >> "//" >> >> * Non-default CTRL_MON group: >> "//" >> >> * Child MON group of default CTRL_MON group: >> "//" >> >> * Child MON group of non-default CTRL_MON group: >> "//" >> >> Op-code can be one of the following: >> >> = Update the assignment to match the flags >> + Assign a new state >> - Unassign a new state >> _ Unassign all the states > > As mentioned in https://lore.kernel.org/lkml/ZjO9hpuLz%2FjJYqvT@e133380.arm.com/ > the "_" is not an operator but instead viewed as an part of . > It is expected to be used with "=", to unset flags it will be used as below: > > echo "non_default_ctrl_mon_grp/child_non_default_mon_grp/0=_" ... Oh.. ok. Will correct it. I also need to verify the parshing.. > >> >> >> Initial group status: >> >> # cat /sys/fs/resctrl/info/L3_MON/mbm_assign_control >> non_default_ctrl_mon_grp//0=tl;1=tl; >> non_default_ctrl_mon_grp/child_non_default_mon_grp/0=tl;1=tl; >> //0=tl;1=tl; >> /child_default_mon_grp/0=tl;1=tl; >> >> >> To update the default group to assign only total event. >> # echo "//0=t" > /sys/fs/resctrl/info/L3_MON/mbm_assign_control >> >> Assignment status after the update: >> # cat /sys/fs/resctrl/info/L3_MON/mbm_assign_control >> non_default_ctrl_mon_grp//0=tl;1=tl; >> non_default_ctrl_mon_grp/child_non_default_mon_grp/0=tl;1=tl; >> //0=t;1=t; >> /child_default_mon_grp/0=tl;1=tl; > > As mentioned in https://lore.kernel.org/lkml/330e3391-b917-4a88-bae3-bdcbb8cfd6f4@intel.com/ > using "0=t" is expected to only impact domain #0, not all domains. Similar for > other examples below. Ok. Sure > >> >> To update the MON group child_default_mon_grp to remove local event: >> # echo "/child_default_mon_grp/0-l" > /sys/fs/resctrl/info/L3_MON/mbm_assign_control >> >> Assignment status after the update: >> # cat /sys/fs/resctrl/info/L3_MON/mbm_assign_control >> //0=t;1=t; >> /child_default_mon_grp/0=t;1=t; >> non_default_ctrl_mon_grp//0=tl;1=tl; >> non_default_ctrl_mon_grp/child_non_default_mon_grp/0=tl;1=tl; >> >> To update the MON group non_default_ctrl_mon_grp/child_non_default_mon_grp to >> remove both local and total events: >> # echo "non_default_ctrl_mon_grp/child_non_default_mon_grp/0_" > >> /sys/fs/resctrl/info/L3_MON/mbm_assign_control >> >> Assignment status after the update: >> # cat /sys/fs/resctrl/info/L3_MON/mbm_assign_control >> //0=t;1=t; >> /child_default_mon_grp/0=t;1=t; >> non_default_ctrl_mon_grp//0=tl;1=tl; >> non_default_ctrl_mon_grp/child_non_default_mon_grp/0=_;1=_; >> >> >> f. Read the event mbm_total_bytes and mbm_local_bytes of the default group. >> There is no change in reading the evetns with ABMC. If the event is unassigned > > evetns -> events Sure. > >> when reading, then the read will come back as Unavailable. >> >> # cat /sys/fs/resctrl/mon_data/mon_L3_00/mbm_total_bytes >> 779247936 >> # cat /sys/fs/resctrl/mon_data/mon_L3_00/mbm_local_bytes >> 765207488 >> >> g. Users will have the option to go back to legacy_mbm mode if required. >> This can be done using the following command. >> >> # echo "legacy_mbm" > /sys/fs/resctrl/info/L3_MON/mbm_assign >> # cat /sys/fs/resctrl/info/L3_MON/mbm_assign >> abmc >> [legacy_mbm] >> > > This needs a mention about how state is impacted when a user makes this > switch. For example, if switching from "legacy" to abmc ... if there > are fewer than "num counters" monitor groups, will they get counters > assigned dynamically? What happens to feature specific resctrl files? > What happens to the counters themselves, are they reset? What else > happens during this switch? Sure. Will add the explanation. When switching from "legacy" to abmc, events in already created resctrl groups will be in Unassigned states. Users need to assign the monitors to each group to read the events. > >> >> h. Check the bandwidth configuration for the group. Note that bandwidth >> configuration has a domain scope. Total event defaults to 0x7F (to >> count all the events) and local event defaults to 0x15 (to count all >> the local numa events). The event bitmap decoding is available at >> https://www.kernel.org/doc/Documentation/x86/resctrl.rst >> in section "mbm_total_bytes_config", "mbm_local_bytes_config": >> >> #cat /sys/fs/resctrl/info/L3_MON/mbm_total_bytes_config >> 0=0x7f;1=0x7f >> >> #cat /sys/fs/resctrl/info/L3_MON/mbm_local_bytes_config >> 0=0x15;1=0x15 >> >> j. Change the bandwidth source for domain 0 for the total event to count only reads. >> Note that this change effects total events on the domain 0. >> >> #echo 0=0x33 > /sys/fs/resctrl/info/L3_MON/mbm_total_bytes_config >> #cat /sys/fs/resctrl/info/L3_MON/mbm_total_bytes_config >> 0=0x33;1=0x7F >> >> k. Now read the total event again. The mbm_total_bytes should display >> only the read events. >> >> #cat /sys/fs/resctrl/mon_data/mon_L3_00/mbm_total_bytes >> 314101 >> >> l. Unmount the resctrl >> >> #umount /sys/fs/resctrl/ >> >> --- > > Reinette -- Thanks Babu Moger