Bug 27056 - [Hygon] [devel-5.10] [Bugfix] Fix memory bandwidth counter width for Hygon QoS
Summary: [Hygon] [devel-5.10] [Bugfix] Fix memory bandwidth counter width for Hygon QoS
Status: IN_PROGRESS
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: X86 (show other bugs) X86
Version: unspecified
Hardware: x86_64 Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: Guanjun
QA Contact:
URL:
Whiteboard:
Keywords: Bugfix
Depends on:
Blocks:
 
Reported: 2025-11-13 14:06 UTC by shenxiaochen
Modified: 2025-11-17 13:40 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description shenxiaochen hygon_group 2025-11-13 14:06:59 UTC
Fix memory bandwidth counter width for Hygon CPUs

The memory bandwidth calculation relies on reading the hardware counter
and measuring the delta between samples. To ensure accurate measurement,
the software reads the counter frequently enough to prevent it from
rolling over twice between reads.

The default base counter width is 24. Currently, Hygon CPUs do not
support the CPUID 0xF.[ECX=1]:EAX to adjust the counter width. But the
Hygon CPUs support wider bandwidth counter with the default width of 32
bits.

Fix the issue by setting the default width to 32 bits (adjusting the
offset to 8 bits) for Hygon CPUs.
Comment 1 小龙 admin 2025-11-13 14:45:08 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/6011