Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\resctrl\monitor.c Create Date:2022-07-28 08:12:32
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Feedback loop for MBA software controller (mba_sc)* mba_sc is a feedback loop where we periodically read MBM counters and* adjust the bandwidth percentage values via the IA32_MBA_THRTL_MSRs so* that:* current bandwdith(cur_bw) < user specified

Proto:static void update_mba_bw(struct rdtgroup *rgrp, struct rdt_domain *dom_mbm)

Type:void

Parameter:

TypeParameterName
struct rdtgroup *rgrp
struct rdt_domain *dom_mbm
363  If Not is_mbm_local_enabled() Then Return
366  r_mba = rdt_resources_all[RDT_RESOURCE_MBA]
367  closid = closid
368  rmid = rmid
369  pmbm_data = mbm_local[rmid]
371  dom_mba = get_domain_from_cpu(smp_processor_id(), r_mba)
372  If Not dom_mba Then
373  pr_warn_once("Failure to get domain for MBA update\n")
374  Return
377  cur_bw = prev_bw
378  user_bw = mbps_val[closid]
379  delta_bw = delta_bw
380  cur_msr_val = ctrl_val[closid]
385  head = crdtgrp_list
387  cmbm_data = mbm_local[rmid]
388  cur_bw += prev_bw
389  delta_bw += delta_bw
406  If cur_msr_val > min_bw && user_bw < cur_bw Then
407  new_msr_val = cur_msr_val - bw_gran
408  Else if cur_msr_val < MAX_MBA_BW && user_bw > cur_bw + delta_bw Then
410  new_msr_val = cur_msr_val + bw_gran
411  Else
412  Return
415  cur_msr = msr_base + closid
416  wrmsrl(cur_msr, Map the memory b/w percentage value to delay values* that can be written to QOS_MSRs.* There are currently no SKUs which support non linear delay values.)
417  ctrl_val[closid] = new_msr_val
429  delta_comp = true
431  cmbm_data = mbm_local[rmid]
432  delta_comp = true
Caller
NameDescribe
mbm_handle_overflow