public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Carsten Emde <Carsten.Emde@osadl.org>
Cc: Jan Blunck <jblunck@suse.de>,
	rt-users <linux-rt-users@vger.kernel.org>,
	kvm@vger.kernel.org, Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [patch 0/3] Patches for KVM & RT
Date: Fri, 10 Apr 2009 09:23:06 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.0904100916530.21577@localhost.localdomain> (raw)
In-Reply-To: <49DE6C4C.3070308@osadl.org>

On Thu, 9 Apr 2009, Carsten Emde wrote:

> Jan,
> 
> > Here are some patches that are necessary to get KVM running with the -rt4
> > patchset.
> Thanks a lot.
> 
> Unfortunaately, there is still a last one at kernel/smp.c:288
>         /* Can deadlock when called with interrupts disabled */
>         WARN_ON_ONCE(irqs_disabled() && !oops_in_progress);
> 
> Do we get another fix?

I think I have seen that before. Just remembered that I fixed that
with Avi last year. Patch got dropped in the 26->29 move.

Thanks,

	tglx

----

From: Thomas Gleixner <tglx@linutronix.de>
Date: Mon, 14 Jan 2008 14:02:44 +0200
Subject: CFS: enable irqs in fire_sched_in_preempt_notifier

KVM expects the notifier call with irqs enabled. It's necessary due
to a possible IPI call. Make the preempt-rt version behave the same
way as mainline.

Signed-off-by: Thomas Gleixner <tgxl@linutronix.de>

---
 kernel/sched.c |    9 +++++++++
 1 file changed, 9 insertions(+)

Index: linux-2.6.24.7-rt27/kernel/sched.c
===================================================================
--- linux-2.6.24.7-rt27.orig/kernel/sched.c	2009-02-08 00:01:16.000000000 -0500
+++ linux-2.6.24.7-rt27/kernel/sched.c	2009-02-08 00:01:22.000000000 -0500
@@ -1821,8 +1821,17 @@ static void fire_sched_in_preempt_notifi
 	struct preempt_notifier *notifier;
 	struct hlist_node *node;
 
+	if (hlist_empty(&curr->preempt_notifiers))
+		return;
+
+	/*
+	 * The KVM sched in notifier expects to be called with
+	 * interrupts enabled.
+	 */
+	local_irq_enable();
 	hlist_for_each_entry(notifier, node, &curr->preempt_notifiers, link)
 		notifier->ops->sched_in(notifier, raw_smp_processor_id());
+	local_irq_disable();
 }
 
 static void

      reply	other threads:[~2009-04-10  7:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-07 23:58 [patch 0/3] Patches for KVM & RT Jan Blunck
2009-04-07 23:58 ` [patch 1/3] Make rt_down_read_trylock() behave like down_read_trylock() Jan Blunck
2009-04-09 13:47   ` Thomas Gleixner
2009-04-07 23:58 ` [patch 2/3] kvm: convert spin-locks to raw_spinlock_t Jan Blunck
2009-04-09  9:21   ` Marcelo Tosatti
2009-04-09 13:48   ` Thomas Gleixner
2009-04-07 23:58 ` [patch 3/3] kvm: wake up waitqueue before calling get_cpu() Jan Blunck
2009-04-09  9:24   ` Marcelo Tosatti
2009-04-09 13:48   ` Thomas Gleixner
2009-04-09 21:44 ` [patch 0/3] Patches for KVM & RT Carsten Emde
2009-04-10  7:23   ` Thomas Gleixner [this message]

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=alpine.LFD.2.00.0904100916530.21577@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=Carsten.Emde@osadl.org \
    --cc=jblunck@suse.de \
    --cc=kvm@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /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