Commit 228fa64a authored by Wang ShaoBo's avatar Wang ShaoBo Committed by Zheng Zengkai
Browse files

arm64/mpam: Supplement additional useful ctrl features for mount options



hulk inclusion
category: feature
feature: ARM MPAM support
bugzilla: 48265
CVE: NA

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

Based on 61fa56e1dd8a ("arm64/mpam: Add resctrl_ctrl_feature structure to manage
ctrl features"), we add several ctrl features and supply corresponding
mount options, including mbPbm, mbMax, mbMin, mbPrio, caMax, caPrio, caPbm,
if MPAM system supports relevant features, we can mount resctrl like this:

e.g.
   > mount -t resctrl resctrl /sys/fs/resctrl -o mbMax,mbMin,caPrio
   > cd /sys/fs/resctrl && cat schemata
     L3:0=0x7fff;1=0x7fff;2=0x7fff;3=0x7fff #default select cpbm as basic ctrl feature
     L3PRI:0=3;1=3;2=3;3=3
     MBMAX:0=100;1=100;2=100;3=100
     MBMIN:0=0;1=0;2=0;3=0

   > mount -t resctrl resctrl /sys/fs/resctrl
   > cd /sys/fs/resctrl && cat schemata
     L3:0=0x7fff;1=0x7fff;2=0x7fff;3=0x7fff #default select cpbm as basic ctrl feature
     MB:0=100;1=100;2=100;3=100  #default select mbw max as basic ctrl feature

   > mount -t resctrl resctrl /sys/fs/resctrl -o caMax
   > cd /sys/fs/resctrl && cat schemata
     L3:0=33554432;1=33554432;2=33554432;3=33554432 #use cmax ctrl feature
     MB:0=100;1=100;2=100;3=100  #default select mbw max as basic ctrl feature

For Cache MSCs, basic ctrl features include cmax(Cache Maximum Capacity)
and cpbm(Cache protion bitmap) partition, if mount options are not specified,
default cpbm will be selected.

For Memory MSCs, basic ctrl features include max(Memory Bandwidth Maximum)
and pbm(Memory Bandwidth Portion Bitmap) partition, if mount options are
not specified, default max will be selected.

Above mount options also can be used accompany with cdp options.

e.g.
   > mount -t resctrl resctrl /sys/fs/resctrl -o caMax,caPrio,cdpl3
   > cd /sys/fs/resctrl && cat schemata
     L3CODE:0=33554432;1=33554432;2=33554432;3=33554432 #code use cmax ctrl feature
     L3DATA:0=33554432;1=33554432;2=33554432;3=33554432 #data use cmax ctrl feature
     L3CODEPRI:0=3;1=3;2=3;3=3 #code use intpriority ctrl feature
     L3DATAPRI:0=3;1=3;2=3;3=3 #data use intpriority ctrl feature
     MB:0=100;1=100;2=100;3=100  #default select mbw max as basic ctrl feature

By combining these mount parameters can we use MPAM more powerfully.

Signed-off-by: default avatarWang ShaoBo <bobo.shaobowang@huawei.com>
Reviewed-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: default avatarCheng Jian <cj.chengjian@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent cae569b3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment