[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1368780244.2813.14.camel@ThinkPad-T5421>
Date: Fri, 17 May 2013 16:44:04 +0800
From: Li Zhong <zhong@...ux.vnet.ibm.com>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Subject: [RFC PATCH nohz] return NOTIFY_BAD in cpu down call back to stop
offlining the cpu
In tick_nohz_cpu_down_callback() if the cpu is the one handling
timekeeping , it seems that we should return something that could stop
notify CPU_DOWN_PREPARE, and then start notify CPU_DOWN_FAILED on the
already called notifier call backs.
-EINVAL will be converted to 0 by notifier_to_errno(), then the cpu
would be taken down with part of the DOWN_PREPARE notifier callbacks
called, and something bad could happen after that.
Signed-off-by: Li Zhong <zhong@...ux.vnet.ibm.com>
---
kernel/time/tick-sched.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index bc67d42..17b8155 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -306,7 +306,7 @@ static int __cpuinit tick_nohz_cpu_down_callback(struct notifier_block *nfb,
* we can't safely shutdown that CPU.
*/
if (have_nohz_full_mask && tick_do_timer_cpu == cpu)
- return -EINVAL;
+ return NOTIFY_BAD;
break;
}
return NOTIFY_OK;
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists