public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	Jeff Chua <jeff.chua.linux@gmail.com>,
	rusty@rustycorp.com.au, vatsa@in.ibm.com, zwane@arm.linux.org.uk,
	kernel list <linux-kernel@vger.kernel.org>,
	Len Brown <lenb@kernel.org>
Subject: Re: cpu hotplug support broken in 2.6.23-rc3
Date: Fri, 14 Sep 2007 14:50:57 +0200	[thread overview]
Message-ID: <1189774257.3100.7.camel@chaos> (raw)
In-Reply-To: <20070914123816.GE1671@elf.ucw.cz>

Pavel,

On Fri, 2007-09-14 at 14:38 +0200, Pavel Machek wrote:
> > I have an yet untested fix, which preserves the broadcast state across
> > the offline state, but Len is looking into it as well, whether we can
> > just reevaluate the power states (and the broadcast flags) when a cpu
> > becomes online again. If Len can do that easily for 2.6.23, I'd prefer
> > that.
> 
> Is there a patch you want me to test? Or does Len have anything to
> play with?

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



  reply	other threads:[~2007-09-14 12:51 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-27 10:43 cpu hotplug support broken in 2.6.23-rc3 Pavel Machek
2007-08-27 10:58 ` Pavel Machek
2007-08-27 14:36   ` Jeff Chua
2007-08-27 15:22     ` Michal Piotrowski
2007-08-27 21:32     ` Pavel Machek
2007-08-27 21:59       ` Rafael J. Wysocki
2007-08-27 21:58         ` Pavel Machek
2007-08-28 10:30           ` Rafael J. Wysocki
2007-08-28 13:00             ` Akinobu Mita
2007-08-28 14:21       ` Jeff Chua
2007-09-03  3:47         ` Pavel Machek
2007-09-03 10:19           ` Rafael J. Wysocki
2007-09-03 12:35             ` Thomas Gleixner
2007-09-04  7:27               ` Pavel Machek
2007-09-13 20:01                 ` Thomas Gleixner
2007-09-14 12:38                   ` Pavel Machek
2007-09-14 12:50                     ` Thomas Gleixner [this message]
2007-09-14 13:15                       ` Thomas Gleixner
2007-09-15  9:49                         ` Thomas Gleixner
2007-09-15 10:18                           ` Andrew Morton
2007-09-15 13:28                             ` Thomas Gleixner
2007-09-15 22:01                               ` Andrew Morton
2007-09-15 13:44                             ` Thomas Gleixner
2007-10-02  9:45                           ` Pavel Machek
2007-09-14 18:49                       ` Pallipadi, Venkatesh
2007-09-14 19:18                         ` Thomas Gleixner
2007-09-03  3:56         ` highres timers break cpu hotplug in 2.6.23-rc5 [was Re: cpu hotplug support broken in 2.6.23-rc3] Pavel Machek
2007-09-03 12:34           ` Jeff Chua
2007-08-29  8:08 ` cpu hotplug support broken in 2.6.23-rc3 Gautham R Shenoy
2007-09-03  3:58   ` Pavel Machek
2007-11-15 22:37     ` cpu hotplug strangeness in 2.6.24-rc2 (was Re: cpu hotplug support broken in 2.6.23-rc3) Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1189774257.3100.7.camel@chaos \
    --to=tglx@linutronix.de \
    --cc=jeff.chua.linux@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=rusty@rustycorp.com.au \
    --cc=vatsa@in.ibm.com \
    --cc=zwane@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox