Unverified Commit d84571e9 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!2987 fix CFS bandwidth vs. hrtimer self deadlock

Merge Pull Request from: @ci-robot 
 
PR sync from: Yu Liao <liaoyu15@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/5GSY2W6Y6MYZYO7QMQR6QPSDWZNM2RIF/ 
Fix the following issue:

	CPU1      		         CPU2                            CPU3

T1 sets cfs_quota
   starts hrtimer cfs_bandwidth 'period_timer'
T1 is migrated to CPU3
					T2(worker thread) initiates
					offlining of CPU1
Hotplug operation starts
  ...
'period_timer' expires and is
re-enqueued on CPU1
  ...
take_cpu_down()
  CPU1 shuts down and does not handle timers
  anymore. They have to be migrated in the
  post dead hotplug steps by the control task.

					T2(worker thread) runs the
					post dead offline operation
									T1 holds lockA
									T1 is scheduled out
									//throttled by CFS bandwidth control
									T1 waits for 'period_timer' to expire
					T2(worker thread) waits for lockA

T1 waits there forever if it is scheduled out before it can execute the
hrtimer offline callback hrtimers_dead_cpu().
Thus T2 waits for lockA forever.


Thomas Gleixner (1):
  hrtimers: Push pending hrtimers away from outgoing CPU earlier

Yu Liao (1):
  cpu/hotplug: fix kabi breakage in enum cpuhp_state


-- 
2.25.1
 
https://gitee.com/openeuler/kernel/issues/I8JEVI 
 
Link:https://gitee.com/openeuler/kernel/pulls/2987

 

Reviewed-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents e4fc2c35 6fc275da
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment