Re: cpu hotplug support broken in 2.6.23-rc3

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Pavel Machek <pavel@...>
Cc: Rafael J. Wysocki <rjw@...>, Jeff Chua <jeff.chua.linux@...>, <rusty@...>, <vatsa@...>, <zwane@...>, kernel list <linux-kernel@...>, Len Brown <lenb@...>
Date: Friday, September 14, 2007 - 8:50 am

Pavel,

On Fri, 2007-09-14 at 14:38 +0200, Pavel Machek wrote:

Venki sent me an initial patch, but it has issues with the notify
ordering. Find below my "cache the broadcast flags" version for testing.

Thanks,

	tglx

---
 kernel/time/tick-broadcast.c |   21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

Index: linux-2.6/kernel/time/tick-broadcast.c
===================================================================
--- linux-2.6.orig/kernel/time/tick-broadcast.c	2007-09-14 13:22:29.000000000 +0200
+++ linux-2.6/kernel/time/tick-broadcast.c	2007-09-14 13:22:29.000000000 +0200
@@ -261,10 +261,25 @@ void tick_broadcast_on_off(unsigned long
 	int cpu = get_cpu();
 
 	if (!cpu_isset(*oncpu, cpu_online_map)) {
-		printk(KERN_ERR "tick-braodcast: ignoring broadcast for "
-		       "offline CPU #%d\n", *oncpu);
-	} else {
+		unsigned long flags;
+
+		spin_lock_irqsave(&tick_broadcast_lock, flags);
+		/*
+		 * We need to cache the broadcast flag for offline
+		 * CPUs. ACPI currently does not reevaluate the
+		 * broadcast flag when a CPU goes online again. Adding
+		 * a cpu notifier to ACPI is probably the correct
+		 * solution, but it is hard to get this correct due to
+		 * notify ordering problems. So caching the flag is
+		 * the safe solution for now.
+		 */
+		if (reason == CLOCK_EVT_NOTIFY_BROADCAST_ON)
+			cpu_set(*oncpu, tick_broadcast_mask);
+		else
+			cpu_clear(*oncpu, tick_broadcast_mask);
 
+		spin_unlock_irqrestore(&tick_broadcast_lock, flags);
+	} else {
 		if (cpu == *oncpu)
 			tick_do_broadcast_on_off(&reason);
 		else


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
cpu hotplug support broken in 2.6.23-rc3, Pavel Machek, (Mon Aug 27, 6:43 am)
Re: cpu hotplug support broken in 2.6.23-rc3, Gautham R Shenoy, (Wed Aug 29, 4:08 am)
Re: cpu hotplug support broken in 2.6.23-rc3, Pavel Machek, (Sun Sep 2, 11:58 pm)
Re: cpu hotplug support broken in 2.6.23-rc3, Pavel Machek, (Mon Aug 27, 6:58 am)
Re: cpu hotplug support broken in 2.6.23-rc3, Jeff Chua, (Mon Aug 27, 10:36 am)
Re: cpu hotplug support broken in 2.6.23-rc3, Michal Piotrowski, (Mon Aug 27, 11:22 am)
Re: cpu hotplug support broken in 2.6.23-rc3, Pavel Machek, (Mon Aug 27, 5:32 pm)
Re: cpu hotplug support broken in 2.6.23-rc3, Jeff Chua, (Tue Aug 28, 10:21 am)
Re: cpu hotplug support broken in 2.6.23-rc3, Pavel Machek, (Sun Sep 2, 11:47 pm)
Re: cpu hotplug support broken in 2.6.23-rc3, Rafael J. Wysocki, (Mon Sep 3, 6:19 am)
Re: cpu hotplug support broken in 2.6.23-rc3, Thomas Gleixner, (Mon Sep 3, 8:35 am)
Re: cpu hotplug support broken in 2.6.23-rc3, Pavel Machek, (Tue Sep 4, 3:27 am)
Re: cpu hotplug support broken in 2.6.23-rc3, Thomas Gleixner, (Thu Sep 13, 4:01 pm)
Re: cpu hotplug support broken in 2.6.23-rc3, Pavel Machek, (Fri Sep 14, 8:38 am)
Re: cpu hotplug support broken in 2.6.23-rc3, Thomas Gleixner, (Fri Sep 14, 8:50 am)
RE: cpu hotplug support broken in 2.6.23-rc3, Pallipadi, Venkatesh, (Fri Sep 14, 2:49 pm)
RE: cpu hotplug support broken in 2.6.23-rc3, Thomas Gleixner, (Fri Sep 14, 3:18 pm)
Re: cpu hotplug support broken in 2.6.23-rc3, Thomas Gleixner, (Fri Sep 14, 9:15 am)
Re: cpu hotplug support broken in 2.6.23-rc3, Thomas Gleixner, (Sat Sep 15, 5:49 am)
Re: cpu hotplug support broken in 2.6.23-rc3, Pavel Machek, (Tue Oct 2, 5:45 am)
Re: cpu hotplug support broken in 2.6.23-rc3, Andrew Morton, (Sat Sep 15, 6:18 am)
Re: cpu hotplug support broken in 2.6.23-rc3, Thomas Gleixner, (Sat Sep 15, 9:28 am)
Re: cpu hotplug support broken in 2.6.23-rc3, Andrew Morton, (Sat Sep 15, 6:01 pm)
Re: cpu hotplug support broken in 2.6.23-rc3, Thomas Gleixner, (Sat Sep 15, 9:44 am)
Re: cpu hotplug support broken in 2.6.23-rc3, Rafael J. Wysocki, (Mon Aug 27, 5:59 pm)
Re: cpu hotplug support broken in 2.6.23-rc3, Pavel Machek, (Mon Aug 27, 5:58 pm)
Re: cpu hotplug support broken in 2.6.23-rc3, Rafael J. Wysocki, (Tue Aug 28, 6:30 am)
Re: cpu hotplug support broken in 2.6.23-rc3, Akinobu Mita, (Tue Aug 28, 9:00 am)