diff options
author | James Morse <james.morse@arm.com> | 2022-09-02 15:48:29 +0000 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2022-09-23 14:25:05 +0200 |
commit | f7b1843eca6fe295ba0c71fc02a3291954078f2b (patch) | |
tree | 7b336d7b8a0a40a54c3bfa67ed8092b6e8acb4e3 /include/linux/resctrl.h | |
parent | d80975e264c8f01518890f3d91ab5bada8fa7f5e (diff) | |
download | lwn-f7b1843eca6fe295ba0c71fc02a3291954078f2b.tar.gz lwn-f7b1843eca6fe295ba0c71fc02a3291954078f2b.zip |
x86/resctrl: Make resctrl_arch_rmid_read() return values in bytes
resctrl_arch_rmid_read() returns a value in chunks, as read from the
hardware. This needs scaling to bytes by mon_scale, as provided by
the architecture code.
Now that resctrl_arch_rmid_read() performs the overflow and corrections
itself, it may as well return a value in bytes directly. This allows
the accesses to the architecture specific 'hw' structure to be removed.
Move the mon_scale conversion into resctrl_arch_rmid_read().
mbm_bw_count() is updated to calculate bandwidth from bytes.
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Jamie Iles <quic_jiles@quicinc.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@fujitsu.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Tested-by: Xin Hao <xhao@linux.alibaba.com>
Tested-by: Shaopeng Tan <tan.shaopeng@fujitsu.com>
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20220902154829.30399-22-james.morse@arm.com
Diffstat (limited to 'include/linux/resctrl.h')
-rw-r--r-- | include/linux/resctrl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h index cb857f753322..0cf5b20c6ddf 100644 --- a/include/linux/resctrl.h +++ b/include/linux/resctrl.h @@ -227,7 +227,7 @@ void resctrl_offline_domain(struct rdt_resource *r, struct rdt_domain *d); * @d: domain that the counter should be read from. * @rmid: rmid of the counter to read. * @eventid: eventid to read, e.g. L3 occupancy. - * @val: result of the counter read in chunks. + * @val: result of the counter read in bytes. * * Call from process context on a CPU that belongs to domain @d. * |