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/
Home Products Support Community News


[Xen-devel] [PATCH] linux/x86: eliminate nesting of run-queue locks insi

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux/x86: eliminate nesting of run-queue locks inside xtime_lock
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Tue, 10 Aug 2010 15:10:26 +0100
Cc: salvet@xxxxxxxxxxx, Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Tue, 10 Aug 2010 07:10:25 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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>
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>

--- a/arch/i386/kernel/time-xen.c
+++ b/arch/i386/kernel/time-xen.c
@@ -666,6 +666,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);
@@ -720,12 +721,14 @@ irqreturn_t timer_interrupt(int irq, voi
        if (shadow_tv_version != HYPERVISOR_shared_info->wc_version) {
-               if (keventd_up())
-                       schedule_work(&clock_was_set_work);
+               schedule_clock_was_set_work = 1;
+       if (schedule_clock_was_set_work && keventd_up())
+               schedule_work(&clock_was_set_work);
         * Account stolen ticks.
         * HACK: Passing NULL to account_steal_time()

Attachment: xenlinux-x86-clock-was-set-work.patch
Description: Text document

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>