| From fbc1b32eba3097d88dbd7b4dbd558e4d5b510652 Mon Sep 17 00:00:00 2001 |
| From: Thomas Gleixner <tglx@linutronix.de> |
| Date: Fri, 3 Jul 2009 13:16:25 -0500 |
| Subject: [PATCH] sched: enable irqs in fire_sched_in_preempt_notifier |
| |
| commit 54afe8908e5645ae6d5d8a8a3ea0b7e81076d2d5 in tip. |
| |
| 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> |
| |
| diff --git a/kernel/sched.c b/kernel/sched.c |
| index 9d1c4cf..2e9167b 100644 |
| --- a/kernel/sched.c |
| +++ b/kernel/sched.c |
| @@ -2853,8 +2853,17 @@ static void fire_sched_in_preempt_notifiers(struct task_struct *curr) |
| 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 |
| -- |
| 1.7.1.1 |
| |