All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: x86-ml <x86@kernel.org>, lkml <linux-kernel@vger.kernel.org>,
	tiwai@suse.de
Subject: Re: irq 16: nobody cared
Date: Mon, 22 Apr 2013 00:12:42 +0200	[thread overview]
Message-ID: <20130421221242.GB4593@pd.tnic> (raw)
In-Reply-To: <20130421220015.GF3509@linux.vnet.ibm.com>

On Sun, Apr 21, 2013 at 03:00:15PM -0700, Paul E. McKenney wrote:
> Cool!!!  Note that there is no need for expediting TINY_RCU because
> its grace periods are already maximally expedited.  There is only one
> CPU, so if you are following the rules, when you call synchronize_rcu(),
> by definition there is a zero-length grace period.  ;-)
>
> So all you need is rcutree.c.

Ok, even better :-).

> Looking forward to the section-mismatch-free version!

Yeah, here it is. Please sanity-check the commit message whether I'm
making sense.

I've just pulled -rc8 and tip/master + this patch and a couple of other
fixes and will run it the coming week to make sure there are no other
issues.

Thanks!

--
>From 3c155e9a22036839c09d98a4acbc7e17a5a3783c Mon Sep 17 00:00:00 2001
From: Borislav Petkov <bp@suse.de>
Date: Sun, 21 Apr 2013 23:56:15 +0200
Subject: [PATCH] RCU: Expedite grace periods during suspend/resume

Paul says CONFIG_RCU_FAST_NO_HZ can increase grace-period durations by a
factor of four. This, in turn, can change timings during suspend and can
delay interrupts handling, leading to "IRQ XX: nobody cared" splats and
the machine disabling those interrupt lines for no sensible reason.

Thus, we want to temporarily switch to expedited grace periods when
suspending the box and return to normal settings when resuming. This
patch does exactly that.

Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
---
 kernel/rcutree.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 986d1d3a34f5..9e9aeb38b7a2 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -53,6 +53,7 @@
 #include <linux/delay.h>
 #include <linux/stop_machine.h>
 #include <linux/random.h>
+#include <linux/suspend.h>
 
 #include "rcutree.h"
 #include <trace/events/rcu.h>
@@ -3097,6 +3098,22 @@ static int __cpuinit rcu_cpu_notify(struct notifier_block *self,
 	return NOTIFY_OK;
 }
 
+static int rcu_pm_notify(struct notifier_block *self,
+			 unsigned long action, void *hcpu)
+{
+	switch (action) {
+	case PM_HIBERNATION_PREPARE:
+		rcu_expedited = 1;
+		break;
+	case PM_POST_RESTORE:
+		rcu_expedited = 0;
+		break;
+	default:
+		break;
+	}
+	return NOTIFY_OK;
+}
+
 /*
  * Spawn the kthread that handles this RCU flavor's grace periods.
  */
@@ -3323,6 +3340,7 @@ void __init rcu_init(void)
 	 * or the scheduler are operational.
 	 */
 	cpu_notifier(rcu_cpu_notify, 0);
+	pm_notifier(rcu_pm_notify, 0);
 	for_each_online_cpu(cpu)
 		rcu_cpu_notify(NULL, CPU_UP_PREPARE, (void *)(long)cpu);
 }
-- 
1.8.2.135.g7b592fa


-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

  reply	other threads:[~2013-04-21 22:12 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-20 18:53 irq 16: nobody cared Borislav Petkov
2013-04-20 23:52 ` Paul E. McKenney
2013-04-21 10:34   ` Borislav Petkov
2013-04-21 16:30     ` Paul E. McKenney
2013-04-21 16:56       ` Borislav Petkov
2013-04-21 18:10         ` Borislav Petkov
2013-04-21 18:56           ` Paul E. McKenney
2013-04-21 19:06             ` Borislav Petkov
2013-04-21 20:34               ` Paul E. McKenney
2013-04-21 20:51                 ` Borislav Petkov
2013-04-21 21:42                   ` Borislav Petkov
2013-04-21 22:00                     ` Paul E. McKenney
2013-04-21 22:12                       ` Borislav Petkov [this message]
2013-04-22  8:01                         ` Ingo Molnar
2013-04-22  9:18                           ` Borislav Petkov
2013-04-22 13:16                             ` Paul E. McKenney
2013-04-21 18:47         ` Paul E. McKenney
2013-04-22  8:32       ` Takashi Iwai
2013-04-22  9:13         ` Borislav Petkov
2013-04-22  9:19           ` Takashi Iwai
2013-04-22 10:06             ` Borislav Petkov
2013-04-22 11:33               ` Takashi Iwai
2013-04-22 13:56                 ` Borislav Petkov
2013-04-22 12:56             ` Thomas Gleixner
2013-04-22 14:23               ` Borislav Petkov
2013-04-22 14:44                 ` Paul E. McKenney
2013-04-22 21:33                   ` Borislav Petkov
2013-04-22 22:07                     ` Paul E. McKenney
2013-04-23 14:10                     ` Thomas Gleixner
2013-04-23 14:34                       ` Borislav Petkov
2013-04-23 15:01                       ` Paul E. McKenney

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=20130421221242.GB4593@pd.tnic \
    --to=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=tiwai@suse.de \
    --cc=x86@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.