【特性描述】
感知业务负载动态调整业务CPU亲和性,当业务负载低时使用prefered cpus处理,增强资源的局部性;当业务负载高时,
突破preferred cpus范围限制,通过增加cpu核的供给提高业务的QOS。
【特性竞争力】
dynamic affinity技术瞄准CPU资源利用率与CPU资源利用效率,当业务负载低时,在满足QOS的基础上,使用最少的CPU
资源,减少CPU迁移、idle切换、cache miss和跨numa访问,增强资源的局部性。当业务负载高时,又可以突破绑核约束
,使用更多CPU资源来提升QOS质量,提高CPU资源利用率。dynamic affinity对资源利用率、利用效率和系统功耗都有重
要的价值。
【硬件架构】
NoArch
【特性约束】
NA
【涉及仓库】
https://gitee.com/openeuler/kernel
【交付个人/团队】
huawei sig
Hi barry19901226, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Kernel, and any of the maintainers: @YangYingliang , @pi3orama , @成坚 (CHENG Jian) , @jiaoff , @Qiuuuuu , @zhengzengkai , @Xie XiuQi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1.测试接口的使用
2.测试低负载场景,检查是否只在preferrd cpus上运行
3.测试高负载场景,检查是否有线程运行在preferred cpus之外的其他有效cpu上。
[root@localhost at]# bash -x dyn_affinity_interface.sh
+ ret=0
++ cat /proc/sys/kernel/sched_util_low_pct
+ default_sched_util_low_pct=85
+ read_default_val /proc/sys/kernel/sched_util_low_pct 85
+ local interface=/proc/sys/kernel/sched_util_low_pct
+ local expect_val=85
+ echo 'TINFO: test /proc/sys/kernel/sched_util_low_pct default value is 85'
TINFO: test /proc/sys/kernel/sched_util_low_pct default value is 85
+ '[' '!' -f /proc/sys/kernel/sched_util_low_pct ']'
++ cat /proc/sys/kernel/sched_util_low_pct
+ '[' 85 '!=' 85 ']'
+ '[' 0 -ne 0 ']'
+ echo 'TPASS: dyn_affinity_interface test success'
TPASS: dyn_affinity_interface test success
+ write_some_val /proc/sys/kernel/sched_util_low_pct -1 1
+ write_some_val /proc/sys/kernel/sched_util_low_pct 101 1
+ write_some_val /proc/sys/kernel/sched_util_low_pct abc 1
+ write_some_val /proc/sys/kernel/sched_util_low_pct 100 0
+ local interface=/proc/sys/kernel/sched_util_low_pct
+ local write_val=100
+ local expect_ret=0
+ echo 'TINFO: write 100 to /proc/sys/kernel/sched_util_low_pct, expect ret: 0'
TINFO: write 100 to /proc/sys/kernel/sched_util_low_pct, expect ret: 0
+ echo 100
+ '[' 0 -ne 0 ']'
+ echo 'TPASS: write 100 to /proc/sys/kernel/sched_util_low_pct success'
TPASS: write 100 to /proc/sys/kernel/sched_util_low_pct success
+ write_some_val /proc/sys/kernel/sched_util_low_pct 0 0
+ local interface=/proc/sys/kernel/sched_util_low_pct
+ local write_val=0
+ local expect_ret=0
+ echo 'TINFO: write 0 to /proc/sys/kernel/sched_util_low_pct, expect ret: 0'
TINFO: write 0 to /proc/sys/kernel/sched_util_low_pct, expect ret: 0
+ echo 0
+ '[' 0 -ne 0 ']'
+ echo 'TPASS: write 0 to /proc/sys/kernel/sched_util_low_pct success'
TPASS: write 0 to /proc/sys/kernel/sched_util_low_pct success
+ cleanup
+ echo 85
+ exit 0
[root@localhost at]#
[root@localhost at]# bash -x dyn_affinity_low_load.sh
+ TEST_CPUSET_PATH=/sys/fs/cgroup/cpuset/cloud
+ TEST_CPU_PATH=/sys/fs/cgroup/cpu/cloud
+ ret=0
++ seq 1 1
+ for i in $(seq 1 1)
+ setup
+ '[' -d /sys/fs/cgroup/cpuset/cloud ']'
+ mkdir -p /sys/fs/cgroup/cpuset/cloud /sys/fs/cgroup/cpu/cloud
+ echo 0
+ echo 0-7
+ echo 1
+ do_test
+ echo 4166
+ echo 4166
+ local pid=0
++ seq 1 3
+ for i in $(seq 1 3)
+ pid=4170
+ echo 4170
+ echo 4170
+ for i in $(seq 1 3)
+ pid=4171
+ echo 4171
+ echo 4171
+ ./cpu_load_not_while
+ for i in $(seq 1 3)
+ pid=4172
+ ./cpu_load_not_while
+ echo 4172
+ ./cpu_load_not_while
+ echo 4172
+ echo 4166
+ echo 4166
+ sleep 0.1
++ seq 1 100
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ egrep 1 -w
++ grep load
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ wc -l
++ egrep 1 -w
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ egrep 1 -w
++ wc -l
++ grep load
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=3
+ '[' 3 -ne 3 ']'
+ '[' 0 -eq 0 ']'
+ ps -o psr,comm,pid
+ grep cpu_load
1 cpu_load_not_wh 4170
1 cpu_load_not_wh 4171
1 cpu_load_not_wh 4172
+ echo 'TPASS: test success'
TPASS: test success
+ cleanup
+ killall cpu_load_not_while
+ sleep 0.1
+ rmdir /sys/fs/cgroup/cpuset/cloud /sys/fs/cgroup/cpu/cloud
+ exit 0
[root@localhost at]# bash -x dyn_affinity_high_load.sh
+ TEST_CPUSET_PATH=/sys/fs/cgroup/cpuset/cloud
+ TEST_CPU_PATH=/sys/fs/cgroup/cpu/cloud
+ ret=0
++ seq 1 1
+ for i in $(seq 1 1)
+ setup
+ '[' -d /sys/fs/cgroup/cpuset/cloud ']'
+ mkdir -p /sys/fs/cgroup/cpuset/cloud /sys/fs/cgroup/cpu/cloud
+ echo 0
+ echo 0-7
+ echo 1
+ do_test
+ echo 4121
+ echo 4121
+ local pid=0
++ seq 1 30
+ for i in $(seq 1 30)
+ pid=4125
+ echo 4125
+ echo 4125
+ for i in $(seq 1 30)
+ pid=4126
+ echo 4126
+ ./cpu_load_not_while
+ echo 4126
+ for i in $(seq 1 30)
+ pid=4127
+ echo 4127
+ ./cpu_load_not_while
+ ./cpu_load_not_while
+ echo 4127
+ for i in $(seq 1 30)
+ pid=4128
+ ./cpu_load_not_while
+ echo 4128
+ echo 4128
+ for i in $(seq 1 30)
+ pid=4129
+ echo 4129
+ echo 4129
+ for i in $(seq 1 30)
+ ./cpu_load_not_while
+ pid=4130
+ echo 4130
+ ./cpu_load_not_while
+ echo 4130
+ for i in $(seq 1 30)
+ pid=4131
+ ./cpu_load_not_while
+ echo 4131
+ echo 4131
+ for i in $(seq 1 30)
+ pid=4132
+ echo 4132
+ echo 4132
+ ./cpu_load_not_while
+ for i in $(seq 1 30)
+ pid=4133
+ ./cpu_load_not_while
+ echo 4133
+ echo 4133
+ for i in $(seq 1 30)
+ pid=4134
+ ./cpu_load_not_while
+ echo 4134
+ echo 4134
+ for i in $(seq 1 30)
+ pid=4135
+ ./cpu_load_not_while
+ echo 4135
+ echo 4135
+ for i in $(seq 1 30)
+ pid=4136
+ ./cpu_load_not_while
+ echo 4136
+ echo 4136
+ for i in $(seq 1 30)
+ pid=4137
+ ./cpu_load_not_while
+ echo 4137
+ echo 4137
+ for i in $(seq 1 30)
+ pid=4138
+ echo 4138
+ ./cpu_load_not_while
+ echo 4138
+ for i in $(seq 1 30)
+ pid=4139
+ ./cpu_load_not_while
+ echo 4139
+ echo 4139
+ for i in $(seq 1 30)
+ pid=4140
+ ./cpu_load_not_while
+ echo 4140
+ echo 4140
+ for i in $(seq 1 30)
+ pid=4141
+ echo 4141
+ ./cpu_load_not_while
+ echo 4141
+ for i in $(seq 1 30)
+ pid=4142
+ echo 4142
+ ./cpu_load_not_while
+ echo 4142
+ for i in $(seq 1 30)
+ pid=4143
+ echo 4143
+ ./cpu_load_not_while
+ echo 4143
+ for i in $(seq 1 30)
+ pid=4144
+ ./cpu_load_not_while
+ echo 4144
+ echo 4144
+ for i in $(seq 1 30)
+ pid=4145
+ ./cpu_load_not_while
+ echo 4145
+ echo 4145
+ for i in $(seq 1 30)
+ pid=4146
+ echo 4146
+ echo 4146
+ ./cpu_load_not_while
+ for i in $(seq 1 30)
+ pid=4147
+ echo 4147
+ echo 4147
+ ./cpu_load_not_while
+ for i in $(seq 1 30)
+ pid=4148
+ echo 4148
+ echo 4148
+ ./cpu_load_not_while
+ for i in $(seq 1 30)
+ pid=4149
+ echo 4149
+ echo 4149
+ ./cpu_load_not_while
+ for i in $(seq 1 30)
+ pid=4150
+ echo 4150
+ echo 4150
+ ./cpu_load_not_while
+ for i in $(seq 1 30)
+ pid=4151
+ echo 4151
+ echo 4151
+ ./cpu_load_not_while
+ for i in $(seq 1 30)
+ pid=4152
+ echo 4152
+ ./cpu_load_not_while
+ echo 4152
+ for i in $(seq 1 30)
+ pid=4153
+ ./cpu_load_not_while
+ echo 4153
+ echo 4153
+ for i in $(seq 1 30)
+ pid=4154
+ ./cpu_load_not_while
+ echo 4154
+ echo 4154
+ echo 4121
+ echo 4121
+ sleep 0.1
++ seq 1 100
+ for i in $(seq 1 100)
++ ps -o psr,comm,pid
++ grep load
++ egrep 1 -w
++ wc -l
+ local count=19
+ '[' 19 -ne 30 ']'
+ ps -o psr,comm,pid
+ grep cpu_load
1 cpu_load_not_wh 4125
6 cpu_load_not_wh 4126
1 cpu_load_not_wh 4127
1 cpu_load_not_wh 4128
1 cpu_load_not_wh 4129
1 cpu_load_not_wh 4130
1 cpu_load_not_wh 4131
1 cpu_load_not_wh 4132
1 cpu_load_not_wh 4133
1 cpu_load_not_wh 4134
7 cpu_load_not_wh 4135
1 cpu_load_not_wh 4136
1 cpu_load_not_wh 4137
4 cpu_load_not_wh 4138
1 cpu_load_not_wh 4139
1 cpu_load_not_wh 4140
1 cpu_load_not_wh 4141
5 cpu_load_not_wh 4142
1 cpu_load_not_wh 4143
1 cpu_load_not_wh 4144
1 cpu_load_not_wh 4145
1 cpu_load_not_wh 4146
1 cpu_load_not_wh 4147
3 cpu_load_not_wh 4148
5 cpu_load_not_wh 4149
1 cpu_load_not_wh 4150
1 cpu_load_not_wh 4151
1 cpu_load_not_wh 4152
5 cpu_load_not_wh 4153
6 cpu_load_not_wh 4154
+ echo 'TPASS: test success'
TPASS: test success
登录 后才可以发表评论