[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Remove hardcoded instances of TIMER_SLOP.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1265808475 0
# Node ID f5fba6214a205c7db80c5af3425a8cafc98f5504
# Parent  83a6621b91bffebdb8696a04b711b4689ee08170
Remove hardcoded instances of TIMER_SLOP.

They aren't needed at all, since slop now only delays a timer firing,
rather than allowing it to happen early.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/ia64/vmx/vlsapic.c |    3 +--
 xen/common/schedule.c       |    5 +----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff -r 83a6621b91bf -r f5fba6214a20 xen/arch/ia64/vmx/vlsapic.c
--- a/xen/arch/ia64/vmx/vlsapic.c       Wed Feb 10 09:20:56 2010 +0000
+++ b/xen/arch/ia64/vmx/vlsapic.c       Wed Feb 10 13:27:55 2010 +0000
@@ -242,7 +242,6 @@ void vtm_set_itc(VCPU *vcpu, uint64_t ne
 }
 
 
-#define TIMER_SLOP (50*1000) /* ns */  /* copy from timer.c */
 extern u64 cycle_to_ns(u64 cyle);
 
 
@@ -258,7 +257,7 @@ void vtm_set_itm(VCPU *vcpu, uint64_t va
         cur_itc = now_itc(vtm);
         if (time_before(val, cur_itc))
             val = cur_itc;
-        expires = NOW() + cycle_to_ns(val-cur_itc) + TIMER_SLOP;
+        expires = NOW() + cycle_to_ns(val-cur_itc);
         vmx_vcpu_unpend_interrupt(vcpu, ITV_VECTOR(vitv));
         set_timer(&vtm->vtm_timer, expires);
     }else{
diff -r 83a6621b91bf -r f5fba6214a20 xen/common/schedule.c
--- a/xen/common/schedule.c     Wed Feb 10 09:20:56 2010 +0000
+++ b/xen/common/schedule.c     Wed Feb 10 13:27:55 2010 +0000
@@ -45,8 +45,6 @@ int sched_smt_power_savings = 0;
 int sched_smt_power_savings = 0;
 boolean_param("sched_smt_power_savings", sched_smt_power_savings);
 
-#define TIME_SLOP      (s32)MICROSECS(50)     /* allow time to slip a bit */
-
 /* Various timer handlers. */
 static void s_timer_fn(void *unused);
 static void vcpu_periodic_timer_fn(void *data);
@@ -775,8 +773,7 @@ static void vcpu_periodic_timer_work(str
 
     periodic_next_event = v->periodic_last_event + v->periodic_period;
 
-    /* The timer subsystem may call us up to TIME_SLOP ahead of deadline. */
-    if ( (now + TIME_SLOP) > periodic_next_event )
+    if ( now >= periodic_next_event )
     {
         send_timer_event(v);
         v->periodic_last_event = now;

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.