]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
x86/resctrl: Remove unused struct mbm_state::chunks_bw
authorJames Morse <james.morse@arm.com>
Wed, 8 Jul 2020 16:39:20 +0000 (16:39 +0000)
committerBorislav Petkov <bp@suse.de>
Tue, 18 Aug 2020 14:51:55 +0000 (16:51 +0200)
Nothing reads struct mbm_states's chunks_bw value, its a copy of
chunks. Remove it.

Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Link: https://lkml.kernel.org/r/20200708163929.2783-2-james.morse@arm.com
arch/x86/kernel/cpu/resctrl/internal.h
arch/x86/kernel/cpu/resctrl/monitor.c

index 5ffa32256b3b269a579791270c10c23a17fb7108..72bb210684667dd2161edf689e5a90fe588e97a7 100644 (file)
@@ -283,7 +283,6 @@ struct rftype {
  * struct mbm_state - status for each MBM counter in each domain
  * @chunks:    Total data moved (multiply by rdt_group.mon_scale to get bytes)
  * @prev_msr   Value of IA32_QM_CTR for this RMID last time we read it
- * @chunks_bw  Total local data moved. Used for bandwidth calculation
  * @prev_bw_msr:Value of previous IA32_QM_CTR for bandwidth counting
  * @prev_bw    The most recent bandwidth in MBps
  * @delta_bw   Difference between the current and previous bandwidth
@@ -292,7 +291,6 @@ struct rftype {
 struct mbm_state {
        u64     chunks;
        u64     prev_msr;
-       u64     chunks_bw;
        u64     prev_bw_msr;
        u32     prev_bw;
        u32     delta_bw;
index 837d7d012b7b14c77759ccf487d99997873bc2de..d6b92d7487a738889594befd0305f858535cafa8 100644 (file)
@@ -279,8 +279,7 @@ static void mbm_bw_count(u32 rmid, struct rmid_read *rr)
                return;
 
        chunks = mbm_overflow_count(m->prev_bw_msr, tval, rr->r->mbm_width);
-       m->chunks_bw += chunks;
-       m->chunks = m->chunks_bw;
+       m->chunks += chunks;
        cur_bw = (chunks * r->mon_scale) >> 20;
 
        if (m->delta_comp)