• Vikas Shivappa's avatar
    x86/intel_rdt/mba_sc: Feedback loop to dynamically update mem bandwidth · de73f38f
    Vikas Shivappa authored
    mba_sc is a feedback loop where we periodically read MBM counters and
    try to restrict the bandwidth below a max value so the below is always
    true:
    
      "current bandwidth(cur_bw) < user specified bandwidth(user_bw)"
    
    The frequency of these checks is currently 1s and we just tag along the
    MBM overflow timer to do the updates. Doing it once in a second also
    makes the calculation of bandwidth easy. The steps of increase or
    decrease of bandwidth is the minimum granularity specified by the
    hardware.
    
    Although the MBA's goal is to restrict the bandwidth below a maximum,
    there may be a need to even increase the bandwidth. Since MBA controls
    the L2 external bandwidth where as MBM measures the L3 external
    bandwidth, we may end up restricting some rdtgroups unnecessarily. This
    may happen in the sequence where rdtgroup (set of jobs) had high
    "L3 <-> memory traffic" in initial phases -> mba_sc kicks in and reduced
    bandwidth percentage values -> but after some it has mostly "L2 <-> L3"
    traffic. In this scenario mba_sc increases the bandwidth percentage when
    there is lesser memory traffic.
    Signed-off-by: default avatarVikas Shivappa <vikas.shivappa@linux.intel.com>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Cc: ravi.v.shankar@intel.com
    Cc: tony.luck@intel.com
    Cc: fenghua.yu@intel.com
    Cc: vikas.shivappa@intel.com
    Cc: ak@linux.intel.com
    Cc: hpa@zytor.com
    Link: https://lkml.kernel.org/r/1524263781-14267-7-git-send-email-vikas.shivappa@linux.intel.com
    de73f38f
intel_rdt.h 13.4 KB