From: Ren Zhijie renzhijie2@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5KUFB CVE: NA
--------------------------------
The logic of this hook is the same as that of the branch that current sched entity delta_exec time bigger than ideal_runtime.
Fixes: 05661011fcac ("sched: cfs: add bpf hooks to control wakeup and tick preemption") Signed-off-by: Ren Zhijie renzhijie2@huawei.com --- kernel/sched/fair.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 3395d102b43e..79e36870b206 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4482,8 +4482,11 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr)
if (ret < 0) return; - else if (ret > 0) + else if (ret > 0) { resched_curr(rq_of(cfs_rq)); + clear_buddies(cfs_rq, curr); + return; + } } #endif