[RFC PATCH 10/18] sched/core: Ignore DL BW deactivation error if in cpuhp_offline_cb_mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With the new strategy of using CPU hotplug to improve CPU isolation
and the optimization of delaying sched domain rebuild until the whole
process completes, we can run into a problem in shutting down the last
CPU of a partition and a -EBUSY error may be returned. This -EBUSY
error is caused by failing the DL BW check in dl_bw_deactivate().

As the CPU deactivation is only temporary and it will be brought back
up again in a short moment, there is no point in failing the operation
because of this DL BW error in this transitioning period. Fix this
problem by ignoring this error when in CPU hotplug offline callback mode
(cpuhp_offline_cb_mode is on).

Signed-off-by: Waiman Long <longman@xxxxxxxxxx>
---
 kernel/sched/core.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 9f02c047e25b..78f4ba73a9f2 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -8469,7 +8469,11 @@ int sched_cpu_deactivate(unsigned int cpu)
 
 	ret = dl_bw_deactivate(cpu);
 
-	if (ret)
+	/*
+	 * Ignore DL BW error if in cpuhp offline callback mode as CPU
+	 * deactivation is only temporary.
+	 */
+	if (ret && !cpuhp_offline_cb_mode)
 		return ret;
 
 	/*
-- 
2.50.0





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux