Re: [PATCH 2/2] x86/resctrl: Fix memory bandwidth counter width for Hygon
From: Xiaochen Shen
Date: Sat Dec 06 2025 - 21:27:06 EST
Hi Tony,
On 12/7/2025 12:14 AM, Xiaochen Shen wrote:
>> Question: What is the value of "hw_res->mon_scale" on a Hygon system?
> I have double confirmed with Hygon hardware architect, in the testing Hygon system:
> hw_res->mon_scale: 64
> hw_res->mbm_width: 32
>
> Here is a rough calculation for the theoretical max bandwidth by the hardware counter:
> (1) 32-bits width and mon_scale is 64:
> 2 ^32 * 64 = 2 ^38 = 256 (B/s)
>
Sorry. Here is a typo:
- 2 ^32 * 64 = 2 ^38 = 256 (B/s)
+ 2 ^32 * 64 = 2 ^38 = 256G (B/s)
> (2) 24-bits width and mon_scale is 64 (this is highly likely to cause overflow):
> 2 ^24 * 64 = 2 ^30 = 1G (B/s)
Best regards,
Xiaochen Shen