401 Star 1.4K Fork 1.3K

GVPopenEuler / kernel

 / 详情

【OLK-5.10】深度隔离:nohz降低时延增强补丁

已完成
任务
创建于  
2021-12-17 14:32

0001-tick-sched-Use-tick_next_period-for-lockless-quick-c.patch
0002-tick-sched-Reduce-seqcount-held-scope-in-tick_do_upd.patch
0003-tick-sched-Optimize-tick_do_update_jiffies64-further.patch
0004-tick-sched-Release-seqcount-before-invoking-calc_loa.patch
0005-tick-nohz-Conditionally-restart-tick-on-idle-exit.patch
0006-tick-nohz-Remove-superflous-check-for-CONFIG_VIRT_CP.patch
0007-tick-nohz-Update-idle_exittime-on-actual-idle-exit.patch
0008-tick-nohz-Only-wake-up-a-single-target-cpu-when-kick.patch
0009-tick-nohz-Change-signal-tick-dependency-to-wake-up-C.patch
0010-tick-nohz-Kick-only-queued-task-whose-tick-depende.patch
0011-tick-nohz-Call-tick_nohz_task_switch-with-interrupts.patch

评论 (2)

yeyunfeng-dev 创建了任务

Hi yeyunfeng-dev, 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: @成坚 (CHENG Jian) , @Qiuuuuu , @zhengzengkai , @gogooo , @Xie XiuQi , @YangYingliang

合入补丁验证:

[root@localhost tracing]# uname -a
Linux localhost.localdomain 5.10.0+ #2 SMP Tue Dec 28 16:57:15 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

启动参数配置:
isolcpus=4-7 nohz_full=4-7

接口配置:
echo 0 >/proc/sys/vm/cache_reclaim_enable
echo 0 > /proc/sys/kernel/timer_migration
echo 0 > /proc/sys/kernel/numa_balancing
echo 1 >/sys/kernel/rcu_normal
echo never >/sys/kernel/mm/transparent_hugepage/enabled
sysctl -w kernel.sched_rt_runtime_us=-1

执行cyclictest测试程序:
taskset -c 4-7 ./cyclictest -a 4-7 -t 3 -p 80 -i 1000 -m -D 600m

开启中断、调度ftrace event:
echo 1 > /sys/kernel/debug/tracing/events/sched/enable
echo 1 > /sys/kernel/debug/tracing/events/irq/enable
echo 1 > /sys/kernel/debug/tracing/events/ipi/enable

测试验证结果:

  1. idle流程中没有重新唤醒tick中断
  2. idle流程没有nohz的 ipi kick干扰
          <idle>-0       [006] d...  7739.581198: sched_switch: prev_comm=swapper/6 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=cyclictest next_pid=49705 next_prio=19
      cyclictest-49705   [006] ....  7739.581208: hrtimer_init: hrtimer=ffff800013a9bd80 clockid=CLOCK_MONOTONIC mode=ABS
      cyclictest-49705   [006] d...  7739.581209: hrtimer_start: hrtimer=ffff800013a9bd80 function=hrtimer_wakeup expires=7739554396280 softexpires=7739554396280 mode=ABS
      cyclictest-49705   [006] d...  7739.581213: sched_switch: prev_comm=cyclictest prev_pid=49705 prev_prio=19 prev_state=S ==> next_comm=swapper/6 next_pid=0 next_prio=120
          <idle>-0       [006] d.h.  7739.582681: irq_handler_entry: irq=10 name=arch_timer
          <idle>-0       [006] d.h.  7739.582683: hrtimer_cancel: hrtimer=ffff800013a9bd80
          <idle>-0       [006] d.h.  7739.582684: hrtimer_expire_entry: hrtimer=ffff800013a9bd80 function=hrtimer_wakeup now=7739554421900
          <idle>-0       [006] d.h.  7739.582685: sched_waking: comm=cyclictest pid=49705 prio=19 target_cpu=006
          <idle>-0       [006] dNh.  7739.582689: sched_wakeup: comm=cyclictest pid=49705 prio=19 target_cpu=006
          <idle>-0       [006] dNh.  7739.582690: hrtimer_expire_exit: hrtimer=ffff800013a9bd80
          <idle>-0       [006] dNh.  7739.582691: irq_handler_exit: irq=10 ret=handled
          <idle>-0       [006] d...  7739.582696: sched_switch: prev_comm=swapper/6 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=cyclictest next_pid=49705 next_prio=19
      cyclictest-49705   [006] ....  7739.582706: hrtimer_init: hrtimer=ffff800013a9bd80 clockid=CLOCK_MONOTONIC mode=ABS
      cyclictest-49705   [006] d...  7739.582707: hrtimer_start: hrtimer=ffff800013a9bd80 function=hrtimer_wakeup expires=7739555896280 softexpires=7739555896280 mode=ABS
      cyclictest-49705   [006] d...  7739.582712: sched_switch: prev_comm=cyclictest prev_pid=49705 prev_prio=19 prev_state=S ==> next_comm=swapper/6 next_pid=0 next_prio=120
          <idle>-0       [006] d.h.  7739.584180: irq_handler_entry: irq=10 name=arch_timer
          <idle>-0       [006] d.h.  7739.584181: hrtimer_cancel: hrtimer=ffff800013a9bd80
          <idle>-0       [006] d.h.  7739.584182: hrtimer_expire_entry: hrtimer=ffff800013a9bd80 function=hrtimer_wakeup now=7739555920000
          <idle>-0       [006] d.h.  7739.584183: sched_waking: comm=cyclictest pid=49705 prio=19 target_cpu=006
          <idle>-0       [006] dNh.  7739.584188: sched_wakeup: comm=cyclictest pid=49705 prio=19 target_cpu=006
          <idle>-0       [006] dNh.  7739.584188: hrtimer_expire_exit: hrtimer=ffff800013a9bd80
          <idle>-0       [006] dNh.  7739.584189: irq_handler_exit: irq=10 ret=handled
          <idle>-0       [006] d...  7739.584194: sched_switch: prev_comm=swapper/6 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=cyclictest next_pid=49705 next_prio=19
      cyclictest-49705   [006] ....  7739.584203: hrtimer_init: hrtimer=ffff800013a9bd80 clockid=CLOCK_MONOTONIC mode=ABS
      cyclictest-49705   [006] d...  7739.584205: hrtimer_start: hrtimer=ffff800013a9bd80 function=hrtimer_wakeup expires=7739557396280 softexpires=7739557396280 mode=ABS
      cyclictest-49705   [006] d...  7739.584209: sched_switch: prev_comm=cyclictest prev_pid=49705 prev_prio=19 prev_state=S ==> next_comm=swapper/6 next_pid=0 next_prio=120
          <idle>-0       [006] d.h.  7739.585683: irq_handler_entry: irq=10 name=arch_timer

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
5329419 openeuler ci bot 1632792936
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel

搜索帮助