[linux-2.6.18-xen] xen: Set blocking timeout to 1/2 jiffy later than we want. This avoids

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[linux-2.6.18-xen] xen: Set blocking timeout to 1/2 jiffy later than we want. This avoids

Xen patchbot-linux-2.6.18-xen
# HG changeset patch
# User Keir Fraser <[hidden email]>
# Date 1212170930 -3600
# Node ID 557a4a0a5eacb83ffb2808c66fd9674e8e26f3e0
# Parent  936f6dd9d49c71c95931c9d8bdf4393cdb9fb42f
xen: Set blocking timeout to 1/2 jiffy later than we want. This avoids
repeated early wakeup just before the jiffy tick, causing us to
effectively spin rather than sleep.

Signed-off-by: Keir Fraser <[hidden email]>
---
 arch/i386/kernel/time-xen.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 936f6dd9d49c -r 557a4a0a5eac arch/i386/kernel/time-xen.c
--- a/arch/i386/kernel/time-xen.c Tue May 27 10:33:54 2008 +0100
+++ b/arch/i386/kernel/time-xen.c Fri May 30 19:08:50 2008 +0100
@@ -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

_______________________________________________
Xen-changelog mailing list
[hidden email]
http://lists.xensource.com/xen-changelog