aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-02-10 13:27:55 +0000
committerKeir Fraser <keir.fraser@citrix.com>2010-02-10 13:27:55 +0000
commite1fadda8bd76fab0cc7c3d17e1437151ae8ed647 (patch)
tree372ad359fbce3b27f747dce681b70f2ea55b3fa8
parente9603f14e3ddf91f2838a6798fab3897fe069259 (diff)
downloadxen-e1fadda8bd76fab0cc7c3d17e1437151ae8ed647.tar.gz
xen-e1fadda8bd76fab0cc7c3d17e1437151ae8ed647.tar.bz2
xen-e1fadda8bd76fab0cc7c3d17e1437151ae8ed647.zip
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@citrix.com>
-rw-r--r--xen/arch/ia64/vmx/vlsapic.c3
-rw-r--r--xen/common/schedule.c5
2 files changed, 2 insertions, 6 deletions
diff --git a/xen/arch/ia64/vmx/vlsapic.c b/xen/arch/ia64/vmx/vlsapic.c
index b382e0b9c0..39f59a7e8a 100644
--- a/xen/arch/ia64/vmx/vlsapic.c
+++ b/xen/arch/ia64/vmx/vlsapic.c
@@ -242,7 +242,6 @@ void vtm_set_itc(VCPU *vcpu, uint64_t new_itc)
}
-#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 val)
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 --git a/xen/common/schedule.c b/xen/common/schedule.c
index 8664de568e..600baeac05 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -45,8 +45,6 @@ string_param("sched", opt_sched);
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(struct vcpu *v)
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;