提交 934c2350 编写于 作者: W Wang ShaoBo 提交者: Yang Yingliang

arm64/mpam: resctrl: collect child mon group's monitor data

hulk inclusion
category: feature
bugzilla: 34278
CVE: NA

-------------------------------------------------

For each ctrl group, it's monitoring data should include all it's child
mon groups' monitoring data, these code is borrowed from Intel-RDT for
facilitating users to configure different monitoring strategies.
Signed-off-by: NWang ShaoBo <bobo.shaobowang@huawei.com>
Reviewed-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: NCheng Jian <cj.chengjian@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NCheng Jian <cj.chengjian@huawei.com>
上级 857e8d34
...@@ -453,6 +453,33 @@ int resctrl_group_mondata_show(struct seq_file *m, void *arg) ...@@ -453,6 +453,33 @@ int resctrl_group_mondata_show(struct seq_file *m, void *arg)
} }
usage = rr->mon_read(d, md.priv); usage = rr->mon_read(d, md.priv);
/*
* if this rdtgroup is ctrlmon group, also collect it's
* mon groups' monitor data.
*/
if (rdtgrp->type == RDTCTRL_GROUP) {
struct list_head *head;
struct rdtgroup *entry;
hw_closid_t hw_closid;
enum resctrl_conf_type type = CDP_CODE;
resctrl_cdp_map(clos, rdtgrp->closid.reqpartid,
CDP_CODE, hw_closid);
/* CDP_CODE share the same closid with CDP_BOTH */
if (md.u.partid != hw_closid_val(hw_closid))
type = CDP_DATA;
head = &rdtgrp->mon.crdtgrp_list;
list_for_each_entry(entry, head, mon.crdtgrp_list) {
resctrl_cdp_map(clos, entry->closid.reqpartid,
type, hw_closid);
md.u.partid = hw_closid_val(hw_closid);
md.u.pmg = entry->mon.rmid;
md.u.mon = entry->mon.mon;
usage += rr->mon_read(d, md.priv);
}
}
seq_printf(m, "%llu\n", usage); seq_printf(m, "%llu\n", usage);
out: out:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册