Bug 562 - [x86_64]部分机器/sys/fs/resctrl目录下缺少mon_data和mon_groups确认
Summary: [x86_64]部分机器/sys/fs/resctrl目录下缺少mon_data和mon_groups确认
Status: CONFIRMED
Alias: None
Product: ANCK 4.19 Dev
Classification: ANCK
Component: general/others (show other bugs) general/others
Version: unspecified
Hardware: x86_64 Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: kun(llfl)
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-24 16:36 UTC by kangjiangbo
Modified: 2023-09-22 17:58 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kangjiangbo 2022-02-24 16:36:47 UTC
Description of problem:
4.19 x86_64内核AMD Qos检查,有的机器上/sys/fs/resctrl目录下缺少mon_data和mon_groups,有的机器上是有的,请帮忙确认下这个是不是正常的,什么情况下存在或不存在这两个目录?

Version-Release number of selected component (if applicable):
# cat /etc/os-release
NAME="Anolis OS"
VERSION="8.2"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="8.2"
PLATFORM_ID="platform:an8"
PRETTY_NAME="Anolis OS 8.2"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"

[root@i22e11409 resctrl]# uname -a
Linux i22e11409.eu95sqa 4.19.91-240.git.bb0f3ad31.an8.x86_64 #1 SMP Wed Feb 23 13:30:10 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:

Steps to Reproduce:
mount -t resctrl resctrl /sys/fs/resctrl
ls /sys/fs/resctrl

Actual results:
# ls /sys/fs/resctrl/
cpus  cpus_list  info  mode  schemata  size  tasks


Expected results:
# ls /sys/fs/resctrl/
cpus  cpus_list  info  mode  mon_data  mon_groups  schemata  size  tasks


Additional info:
内核已开启CONFIG_RESCTRL配置
# grep -i resctrl /boot/config-$(uname -r)
CONFIG_RESCTRL=y
这个应该跟cpu有关,部分信息如下:
不存在mon_data和mon_groups目录的机器:
# lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              96
On-line CPU(s) list: 0-95
Thread(s) per core:  2
Core(s) per socket:  24
Socket(s):           2
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               85
Model name:          Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz
Stepping:            4
CPU MHz:             1024.291
CPU max MHz:         3100.0000
CPU min MHz:         1000.0000
BogoMIPS:            5000.00
Virtualization:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            1024K
L3 cache:            33792K
NUMA node0 CPU(s):   0-95
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke md_clear flush_l1d
[root@i22e11409 resctrl]# pqos -d
NOTE:  Mixed use of MSR and kernel interfaces to manage
       CAT or CMT & MBM may lead to unexpected behavior.
WARN: resctl filesystem mounted! Using MSR interface may corrupt resctrl filesystem and cause unexpected behaviour
Hardware capabilities
    Monitoring
        Cache Monitoring Technology (CMT) events:
            LLC Occupancy (LLC)
        Memory Bandwidth Monitoring (MBM) events:
            Total Memory Bandwidth (TMEM)
            Local Memory Bandwidth (LMEM)
            Remote Memory Bandwidth (RMEM) (calculated)
        PMU events:
            Instructions/Clock (IPC)
            LLC misses
    Allocation
        Cache Allocation Technology (CAT)
            L3 CAT
                CDP: enabled
                Num COS: 8
        Memory Bandwidth Allocation (MBA)
            Num COS: 8
OS capabilities (Linux kernel 4.19.91-240.git.bb0f3ad31.an8.x86_64)
    Monitoring
        Cache Monitoring Technology (CMT) events:
            LLC Occupancy (LLC)
        Memory Bandwidth Monitoring (MBM) events:
            Total Memory Bandwidth (TMEM)
            Local Memory Bandwidth (LMEM)
            Remote Memory Bandwidth (RMEM) (calculated)
        PMU events:
            Instructions/Clock (IPC)
            LLC misses
    Allocation
        Cache Allocation Technology (CAT)
            L3 CAT
                CDP: enabled
                Num COS: 8
        Memory Bandwidth Allocation (MBA)
            Num COS: 8


存在mon_data和mon_groups目录的机器:
# lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              32
On-line CPU(s) list: 0-31
Thread(s) per core:  2
Core(s) per socket:  16
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               79
Model name:          Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz
Stepping:            1
CPU MHz:             2500.241
CPU max MHz:         2500.0000
CPU min MHz:         1200.0000
BogoMIPS:            4988.38
Virtualization:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            40960K
NUMA node0 CPU(s):   0-31
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti intel_ppin tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap intel_pt xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm arat pln pts
[root@e18k01644 resctrl]# pqos -d
NOTE:  Mixed use of MSR and kernel interfaces to manage
       CAT or CMT & MBM may lead to unexpected behavior.
WARN: resctl filesystem mounted! Using MSR interface may corrupt resctrl filesystem and cause unexpected behaviour
Hardware capabilities
    Monitoring
        Cache Monitoring Technology (CMT) events:
            LLC Occupancy (LLC)
        Memory Bandwidth Monitoring (MBM) events:
            Total Memory Bandwidth (TMEM)
            Local Memory Bandwidth (LMEM)
            Remote Memory Bandwidth (RMEM) (calculated)
        PMU events:
            Instructions/Clock (IPC)
            LLC misses
    Allocation
        Cache Allocation Technology (CAT)
            L3 CAT
                CDP: enabled
                Num COS: 8
OS capabilities (Linux kernel 4.19.91-240.git.bb0f3ad31.an8.x86_64)
    Monitoring
        Cache Monitoring Technology (CMT) events:
            LLC Occupancy (LLC)
        Memory Bandwidth Monitoring (MBM) events:
            Total Memory Bandwidth (TMEM)
            Local Memory Bandwidth (LMEM)
            Remote Memory Bandwidth (RMEM) (calculated)
        PMU events:
            Instructions/Clock (IPC)
            LLC misses
    Allocation
        Cache Allocation Technology (CAT)
            L3 CAT
                CDP: enabled
                Num COS: 8
Comment 1 Artie Ding 2022-04-25 15:44:55 UTC
log 中是 Intel 的机器,确认一下是 AMD QoS 吗?
Intel 机器参考:
https://github.com/intel/intel-cmt-cat/wiki/resctrl 
参考命令:
mount -t resctrl resctrl [-o cdp[,cdpl2][,mba_MBps]] /sys/fs/resctrl
Comment 2 kangjiangbo 2022-06-07 16:05:12 UTC
(In reply to Artie Ding from comment #1)
> log 中是 Intel 的机器,确认一下是 AMD QoS 吗?
> Intel 机器参考:
> https://github.com/intel/intel-cmt-cat/wiki/resctrl 
> 参考命令:
> mount -t resctrl resctrl [-o cdp[,cdpl2][,mba_MBps]] /sys/fs/resctrl

https://github.com/intel/intel-cmt-cat/wiki/resctrl 
Make sure you have set the appropriate kernel flag, this is done in the kernel .config file:

# Intel Resource Director Technology Allocation support (INTEL_RDT_A) [N/y/?] (NEW) y

用例写的是AMD QoS check,机器上没有查到这个配置,那这个测试没有意义吧?
# cat /boot/config-$(uname -r) |grep -i intel|grep -i rdt

参考说明,下边的指令执行不成功
# mount -t resctrl resctrl -o cdp /sys/fs/resctrl
mount: /sys/fs/resctrl: wrong fs type, bad option, bad superblock on resctrl, missing codepage or helper program, or other error.
Comment 3 Artie Ding alibaba_cloud_group 2022-06-08 16:09:07 UTC
确认一下正常的机器 CPU 信息,不正常的机器有哪些。

> 参考说明,下边的指令执行不成功
> # mount -t resctrl resctrl -o cdp /sys/fs/resctrl
> mount: /sys/fs/resctrl: wrong fs type, bad option, bad superblock on resctrl,  missing codepage or helper program, or other error.

上面的错误信息一般是因为存在其他模块同 resctrl 存在冲突。