Bug 6172 - [ANCK-5.10-16][x86_64][nightly]perf_event_tests:branch-misses失败,The mispredicts should be roughly between 125000 and 375000,Mispredicts too high
Summary: [ANCK-5.10-16][x86_64][nightly]perf_event_tests:branch-misses失败,The mispredic...
Status: NEW
Alias: None
Product: Antest
Classification: Infrastructures
Component: 测试用例 (show other bugs) 测试用例
Version: unspecified
Hardware: x86_64 Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: shuancue
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-16 17:42 UTC by shanxifanshi
Modified: 2023-10-16 11:39 UTC (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description shanxifanshi alibaba_cloud_group 2023-08-16 17:42:05 UTC
[缺陷描述]:
perf_event_tests:branch-misses用例失败,The mispredicts should be roughly between 125000 and 375000,Mispredicts too high; 目前仅发现在F51机型fail,在其他型号机器上pass

测试日志:
# ./generalized_events/branch-misses

Part 1
Testing a loop with 1500000 branches (100 times):
        On a simple loop like this, miss rate should be very small.
        Average number of branch misses: 3

Part 2

Testing a function that branches based on a random number
   The loop has 15967781 branches.
   500000 are random branches; 250699 of those were taken

Out of 15967781 branches, 1283545 were mispredicted
Assuming a good random number generator and no freaky luck
The mispredicts should be roughly between 125000 and 375000
Mispredicts too high
Testing "branch-misses" generalized event...               FAILED


复现环境:
anck 5.10 x86物理机 F51机型

复现概率:
必现

内核信息:
# uname -r
5.10.134-77.git.a73b26af8.an8.x86_64

# perf -v
perf version 5.10.134-77.git.a73b26af8.an8.x86_64

操作系统信息:
# cat /etc/os-release
NAME="Anolis OS"
VERSION="8.8"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="8.8"
PLATFORM_ID="platform:an8"
PRETTY_NAME="Anolis OS 8.8"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"

cpu信息:
# 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
BIOS Vendor ID:      Intel(R) Corporation
CPU family:          6
Model:               85
Model name:          Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz
BIOS Model name:     Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz
Stepping:            4
CPU MHz:             1588.184
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 pti 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 arch_capabilities

内存信息:
# free -h
              total        used        free      shared  buff/cache   available
Mem:          503Gi       4.9Gi       497Gi       2.0Mi       829Mi       495Gi
Swap:            0B          0B          0B

内核参数:
# cat /proc/cmdline
BOOT_IMAGE=(hd0,msdos1)/boot/vmlinuz-5.10.134-77.git.a73b26af8.an8.x86_64 root=UUID=a5b37697-06a2-41c2-9345-b1aced9b8a70 ro cryptomgr.notests rcupdate.rcu_cpu_stall_timeout=300 vring_force_dma_api rhgb quiet biosdevname=0 net.ifnames=0 console=tty0 console=ttyS0,115200n8 noibrs nvme_core.io_timeout=4294967295 nvme_core.admin_timeout=4294967295 cgroup.memory=nokmem crashkernel=0M-2G:0M,2G-8G:192M,8G-:256M

[复现步骤]:
git clone https://github.com/deater/perf_event_tests.git
cd perf_event_tests 
make 
cd tests

执行用例
./generalized_events/branch-misses

[期望结果]:
用例pass

[实际结果]:
用例fail
Comment 1 shanxifanshi alibaba_cloud_group 2023-10-16 11:39:20 UTC
在016 x86内核,F51机型上测试,仍然fail。

# ./tests/generalized_events/branch-misses

Part 1
Testing a loop with 1500000 branches (100 times):
        On a simple loop like this, miss rate should be very small.
        Average number of branch misses: 3

Part 2

Testing a function that branches based on a random number
   The loop has 15967780 branches.
   500000 are random branches; 250699 of those were taken

Out of 15967780 branches, 1283506 were mispredicted
Assuming a good random number generator and no freaky luck
The mispredicts should be roughly between 125000 and 375000
Mispredicts too high
Testing "branch-misses" generalized event...               FAILED

# uname -r
5.10.134-16_rc1.an8.x86_64