WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] xen/x86: eliminate nesting of run-que

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] xen/x86: eliminate nesting of run-queue locks inside xtime_lock
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 26 Aug 2010 00:55:06 -0700
Delivery-date: Thu, 26 Aug 2010 00:55:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1281451661 -3600
# Node ID 53705d74a41b4d86238e6b275893fba95fd13550
# Parent  566d68f989eec2fa570fd0273a07e79d7702d773
xen/x86: eliminate nesting of run-queue locks inside xtime_lock

From: Zdenek Salvet <salvet@xxxxxxxxxxx>

According to Debian bug 591362 this has been causing problems. While
no proof was given that the inverse lock order does actually occur
anywhere (with interrupts enabled), it is plain unnecessary to take
the risk.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 arch/i386/kernel/time-xen.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff -r 566d68f989ee -r 53705d74a41b arch/i386/kernel/time-xen.c
--- a/arch/i386/kernel/time-xen.c       Tue Aug 10 15:46:56 2010 +0100
+++ b/arch/i386/kernel/time-xen.c       Tue Aug 10 15:47:41 2010 +0100
@@ -654,6 +654,7 @@ irqreturn_t timer_interrupt(int irq, voi
        s64 delta, delta_cpu, stolen, blocked;
        u64 sched_time;
        unsigned int i, cpu = smp_processor_id();
+       int schedule_clock_was_set_work = 0;
        struct shadow_time_info *shadow = &per_cpu(shadow_time, cpu);
        struct vcpu_runstate_info *runstate = &per_cpu(runstate, cpu);
 
@@ -715,11 +716,13 @@ irqreturn_t timer_interrupt(int irq, voi
 
        if (shadow_tv_version != HYPERVISOR_shared_info->wc_version) {
                update_wallclock();
-               if (keventd_up())
-                       schedule_work(&clock_was_set_work);
+               schedule_clock_was_set_work = 1;
        }
 
        write_sequnlock(&xtime_lock);
+
+       if (schedule_clock_was_set_work && keventd_up())
+               schedule_work(&clock_was_set_work);
 
        /*
         * Account stolen ticks.

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] xen/x86: eliminate nesting of run-queue locks inside xtime_lock, Xen patchbot-linux-2.6.18-xen <=