An error occurred fetching the project authors.
  1. 16 Feb, 2024 11 commits
  2. 24 Jan, 2024 1 commit
    • Tony Luck's avatar
      x86/resctrl: Implement new mba_MBps throttling heuristic · c2427e70
      Tony Luck authored
      The mba_MBps feedback loop increases throttling when a group is using
      more bandwidth than the target set by the user in the schemata file, and
      decreases throttling when below target.
      
      To avoid possibly stepping throttling up and down on every poll a flag
      "delta_comp" is set whenever throttling is changed to indicate that the
      actual change in bandwidth should be recorded on the next poll in
      "delta_bw". Throttling is only reduced if the current bandwidth plus
      delta_bw is below the user target.
      
      This algorithm works well if the workload has steady bandwidth needs.
      But it can go badly wrong if the workload moves to a different phase
      just as the throttling level changed. E.g. if the workload becomes
      essentially idle right as throttling level is increased, the value
      calculated for delta_bw will be more or less the old bandwidth level.
      If the workload then resumes, Linux may never reduce throttling because
      current bandwidth plus delta_bw is above the target set by the user.
      
      Implement a simpler heuristic by assuming that in the worst case the
      currently measured bandwidth is being controlled by the current level of
      throttling. Compute how much it may increase if throttling is relaxed to
      the next higher level. If that is still below the user target, then it
      is ok to reduce the amount of throttling.
      
      Fixes: ba0f26d8 ("x86/intel_rdt/mba_sc: Prepare for feedback loop")
      Reported-by: default avatarXiaochen Shen <xiaochen.shen@intel.com>
      Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
      Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
      Reviewed-by: default avatarReinette Chatre <reinette.chatre@intel.com>
      Tested-by: default avatarXiaochen Shen <xiaochen.shen@intel.com>
      Link: https://lore.kernel.org/r/20240122180807.70518-1-tony.luck@intel.com
      c2427e70
  3. 23 Jan, 2024 2 commits
  4. 17 Oct, 2023 4 commits
  5. 11 Oct, 2023 1 commit
  6. 15 Mar, 2023 1 commit
    • Shawn Wang's avatar
      x86/resctrl: Clear staged_config[] before and after it is used · 0424a7df
      Shawn Wang authored
      As a temporary storage, staged_config[] in rdt_domain should be cleared
      before and after it is used. The stale value in staged_config[] could
      cause an MSR access error.
      
      Here is a reproducer on a system with 16 usable CLOSIDs for a 15-way L3
      Cache (MBA should be disabled if the number of CLOSIDs for MB is less than
      16.) :
      	mount -t resctrl resctrl -o cdp /sys/fs/resctrl
      	mkdir /sys/fs/resctrl/p{1..7}
      	umount /sys/fs/resctrl/
      	mount -t resctrl resctrl /sys/fs/resctrl
      	mkdir /sys/fs/resctrl/p{1..8}
      
      An error occurs when creating resource group named p8:
          unchecked MSR access error: WRMSR to 0xca0 (tried to write 0x00000000000007ff) at rIP: 0xffffffff82249142 (cat_wrmsr+0x32/0x60)
          Call Trace:
           <IRQ>
           __flush_smp_call_function_queue+0x11d/0x170
           __sysvec_call_function+0x24/0xd0
           sysvec_call_function+0x89/0xc0
           </IRQ>
           <TASK>
           asm_sysvec_call_function+0x16/0x20
      
      When creating a new resource control group, hardware will be configured
      by the following process:
          rdtgroup_mkdir()
            rdtgroup_mkdir_ctrl_mon()
              rdtgroup_init_alloc()
                resctrl_arch_update_domains()
      
      resctrl_arch_update_domains() iterates and updates all resctrl_conf_type
      whose have_new_ctrl is true. Since staged_config[] holds the same values as
      when CDP was enabled, it will continue to update the CDP_CODE and CDP_DATA
      configurations. When group p8 is created, get_config_index() called in
      resctrl_arch_update_domains() will return 16 and 17 as the CLOSIDs for
      CDP_CODE and CDP_DATA, which will be translated to an invalid register -
      0xca0 in this scenario.
      
      Fix it by clearing staged_config[] before and after it is used.
      
      [reinette: re-order commit tags]
      
      Fixes: 75408e43 ("x86/resctrl: Allow different CODE/DATA configurations to be staged")
      Suggested-by: default avatarXin Hao <xhao@linux.alibaba.com>
      Signed-off-by: default avatarShawn Wang <shawnwang@linux.alibaba.com>
      Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
      Tested-by: default avatarReinette Chatre <reinette.chatre@intel.com>
      Cc:stable@vger.kernel.org
      Link: https://lore.kernel.org/all/2fad13f49fbe89687fc40e9a5a61f23a28d1507a.1673988935.git.reinette.chatre%40intel.com
      0424a7df
  7. 23 Jan, 2023 4 commits
  8. 27 Nov, 2022 1 commit
  9. 23 Sep, 2022 6 commits
  10. 22 Sep, 2022 9 commits