• Fenghua Yu's avatar
    x86/resctrl: Correct MBM total and local values · 4868a61d
    Fenghua Yu authored
    Intel Memory Bandwidth Monitoring (MBM) counters may report system
    memory bandwidth incorrectly on some Intel processors. The errata SKX99
    for Skylake server, BDF102 for Broadwell server, and the correction
    factor table are documented in Documentation/x86/resctrl.rst.
    
    Intel MBM counters track metrics according to the assigned Resource
    Monitor ID (RMID) for that logical core. The IA32_QM_CTR register
    (MSR 0xC8E) used to report these metrics, may report incorrect system
    bandwidth for certain RMID values.
    
    Due to the errata, system memory bandwidth may not match what is
    reported.
    
    To work around the errata, correct MBM total and local readings using a
    correction factor table. If rmid > rmid threshold, MBM total and local
    values should be multiplied by the correction factor.
    
     [ bp: Mark mbm_cf_table[] __initdata. ]
    Signed-off-by: default avatarFenghua Yu <fenghua.yu@intel.com>
    Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
    Reviewed-by: default avatarTony Luck <tony.luck@intel.com>
    Link: https://lkml.kernel.org/r/20201014004927.1839452-3-fenghua.yu@intel.com
    4868a61d
core.c 25.1 KB