Commit 51bf645d authored by Zhang Qiao's avatar Zhang Qiao Committed by Zheng Zengkai
Browse files

sched/fair: Update rq clock before unthrottle a qos cfs_rq

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4VZJT


CVE: NA

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

------------[ cut here]------------
 rq->clock_update_flags < RQCF_ACT_SKIP
 WARNING: CPU: 5 PID: 3312 at kernel/sched/sched.h:1223 update_curr+0x1e5/0x210
 CPU: 5 PID: 3312 Comm: a.out Tainted: G S5.10.0.zq+ #1
 Hardware name: Huawei RH2288H V3/BC11HGSA0, BIOS 3.35 10/20/2016
 RIP: 0010:update_curr+0x1e5/0x210
 enqueue_entity+0x378/0xd00
 unthrottle_qos_cfs_rq+0x1bc/0x2a0
 __unthrottle_qos_cfs_rqs+0x87/0xa0
 qos_overload_timer_handler+0x35/0x60
 __run_hrtimer+0x5e/0x190
 __hrtimer_run_queues+0x81/0xe0
 hrtimer_interrupt+0x110/0x2c0
 __sysvec_apic_timer_interrupt+0x5f/0xd0
 sysvec_apic_timer_interrupt+0x31/0x80
 asm_sysvec_apic_timer_interrupt+0x12/0x20

After the last rq_pin_lock(), there is no rq clock update before calling
enqueue_entity() at unthrottle_qos_cfs_rq();

This patch fixes it by updating rq clock before calling enqueue_entity().

Fixes: c62a5f13("sched/qos: Add qos_tg_{throttle,unthrottle}_{up,down}")
Signed-off-by: default avatarZhang Qiao <zhangqiao22@huawei.com>
Reviewed-by: default avatarChen Hui <judy.chenhui@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent ac02c0bf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment