Open
回合主线补丁:sched/rt: Skip currently executing CPU in rto_next_cpu() #8689
JacksparkAdd on  Mar 9
Jackspark
Mar 9 Create

回合主线补丁:sched/rt: Skip currently executing CPU in rto_next_cpu()
补丁链接:https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=94894c9c477e53bcea052e075c53f89df3d2a33e
问题原因:
1.CPU0 因运行绑核 RT 任务、非绑核 RT 任务及长期占内核态的 CFS 任务,处于 overloaded 状态;其他 CPU 切换非 RT 任务时触发 RT 负载均衡,通过 IPI 通知 CPU0 执行任务推送
2.CPU0 执行推送逻辑时,因下一个任务优先级更高,仅置位调度标记后返回;后续它会寻找下一个 overloaded CPU,却因仅 CPU0 过载本应返回 - 1,但多 CPU 负载均衡导致 rd->rto_loop 与 rto_loop_next 不相等,迫使循环重新查找
3.而 CPU0 始终满足 overloaded 条件,最终会再次选中自己,反复通过 IPI 给自己下发任务推送请求。只要 CPU0 保持过载且其他 CPU 持续触发 RT 负载均衡,就会陷入自发送 IPI 的循环,浪费 CPU 资源

likedislike
openeuler-ci-botopeneuler-ci-botCollaborators
Mar 9 Added label: sig/Kernel
openeuler-ci-bot
openeuler-ci-botCollaborators
Mar 9 Comments:

Welcome To openEuler Community

Hey @Jackspark , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.

Contact Guide

If you have any questions, please contact the SIG: Kernel ,
and any of the maintainers: @hanjunguo, @oekernel, @sanglipeng, @zeng_zhaorong, @zhengzengkai ,
and any of the committers: @CTC-XiboWang, @Frank_Sae, @GongLei-, @LiuYongQiang0816, @SuperSix173, @Tankll2021, @TrueAI, @allen-shi, @baratta, @caixu-blue, @chenjiesong, @chenjunxin1992, @chenke2026, @chiqijun, @chriszjh, @duanqiangwen, @fangfeng123, @fanghaiqinghw, @gaojuxin09, @gouhao2022, @guzitao, @hanjunguo, @hanliyang, @hellotcc, @hjx_gitff, @hongwu-wang, @htforge, @hu-chunzhi, @hunan4222, @jackknight, @jerry_lilijun, @junlong-zheng, @juntianlinux, @kailiu42, @kaitiandu, @kazero00, @kevinzhu1, @kile2009, @koishimind, @kongzizaixian, @leoliu-oc, @li-huisong, @linan888, @linyunsheng, @liulongfang, @lostway1, @lujialin2, @markyuan4ta21, @mingqian218472, @mufengyan, @qinirao, @robinorg, @rock_hw, @sanglipeng, @shu-shengming, @shuaijiakun, @sming56_admin, @stavewu, @stkid, @wangboe2022, @wenzhiwei11, @whoisxxx, @wkfxxx, @woqidaideshi, @wsoydl, @xingmz1, @xukuohai, @yeweihua999, @ygn-ndwd-official, @yonghu_4dc5, @young-sun, @yuehaibing_planb, @yuzenghui1, @zhang-changzhong, @zhangyi089, @zhujianwei001, @zichengqu, @zqiao216 .

likedislike
Oopeneuler-infra-botCollaborators
Mar 9 Associated pull request
Oopeneuler-infra-botCollaborators
Mar 9 Associated pull request