Commit 1bbe05d2 authored by Xiangyou Xie's avatar Xiangyou Xie Committed by Zheng Zengkai
Browse files

sched/idle: introduce smart halt polling

hulk inclusion
category: feature
bugzilla: 176961 https://gitee.com/openeuler/kernel/issues/I4E05T



-------------------------------------------------

In guest, Before entering the real idle, polling for a while. if
the current task is set TIF_NEED_RESCHED during the polling process,
it will immediately break from the polling loop.

The polling time poll_threshold_ns can be adjusted by sysctl to avoid
100% of the CPU usage in host. This value can be adjusted according to
the requirements.

This optimization needs to support _TIF_POLLING_NRFLAG, that can
optimize the overhead of ttwu IPI. Wakeup response delay reduced
from 4us to 1us.

Signed-off-by: default avatarXiangyou Xie <xiexiangyou@huawei.com>
Signed-off-by: default avatarLi Hua <hucool.lihua@huawei.com>
Reviewed-by: default avatarChen Hui <judy.chenhui@huawei.com>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 33adabdd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment