]> xenbits.xensource.com Git - xenclient/kernel.git/commitdiff
xen: Set blocking timeout to 1/2 jiffy later than we want. This avoids
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 30 May 2008 18:08:50 +0000 (19:08 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 30 May 2008 18:08:50 +0000 (19:08 +0100)
repeated early wakeup just before the jiffy tick, causing us to
effectively spin rather than sleep.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
arch/i386/kernel/time-xen.c

index 89aff05cc9c1a502caa185c18a83239597c218e7..3815fff8204ec8060a478c3901f31f6dc697fbee 100644 (file)
@@ -1013,7 +1013,7 @@ static void stop_hz_timer(void)
                j = jiffies + 1;
        }
 
-       singleshot.timeout_abs_ns = jiffies_to_st(j);
+       singleshot.timeout_abs_ns = jiffies_to_st(j) + NS_PER_TICK/2;
        singleshot.flags = 0;
        rc = HYPERVISOR_vcpu_op(VCPUOP_set_singleshot_timer, cpu, &singleshot);
 #if CONFIG_XEN_COMPAT <= 0x030004