debuggers.hg

changeset 20967:f5fba6214a20

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>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Feb 10 13:27:55 2010 +0000 (2010-02-10)
parents 83a6621b91bf
children 4b2aa9c350e6
files xen/arch/ia64/vmx/vlsapic.c xen/common/schedule.c
line diff
     1.1 --- a/xen/arch/ia64/vmx/vlsapic.c	Wed Feb 10 09:20:56 2010 +0000
     1.2 +++ b/xen/arch/ia64/vmx/vlsapic.c	Wed Feb 10 13:27:55 2010 +0000
     1.3 @@ -242,7 +242,6 @@ void vtm_set_itc(VCPU *vcpu, uint64_t ne
     1.4  }
     1.5  
     1.6  
     1.7 -#define TIMER_SLOP (50*1000) /* ns */  /* copy from timer.c */
     1.8  extern u64 cycle_to_ns(u64 cyle);
     1.9  
    1.10  
    1.11 @@ -258,7 +257,7 @@ void vtm_set_itm(VCPU *vcpu, uint64_t va
    1.12          cur_itc = now_itc(vtm);
    1.13          if (time_before(val, cur_itc))
    1.14              val = cur_itc;
    1.15 -        expires = NOW() + cycle_to_ns(val-cur_itc) + TIMER_SLOP;
    1.16 +        expires = NOW() + cycle_to_ns(val-cur_itc);
    1.17          vmx_vcpu_unpend_interrupt(vcpu, ITV_VECTOR(vitv));
    1.18          set_timer(&vtm->vtm_timer, expires);
    1.19      }else{
     2.1 --- a/xen/common/schedule.c	Wed Feb 10 09:20:56 2010 +0000
     2.2 +++ b/xen/common/schedule.c	Wed Feb 10 13:27:55 2010 +0000
     2.3 @@ -45,8 +45,6 @@ string_param("sched", opt_sched);
     2.4  int sched_smt_power_savings = 0;
     2.5  boolean_param("sched_smt_power_savings", sched_smt_power_savings);
     2.6  
     2.7 -#define TIME_SLOP      (s32)MICROSECS(50)     /* allow time to slip a bit */
     2.8 -
     2.9  /* Various timer handlers. */
    2.10  static void s_timer_fn(void *unused);
    2.11  static void vcpu_periodic_timer_fn(void *data);
    2.12 @@ -775,8 +773,7 @@ static void vcpu_periodic_timer_work(str
    2.13  
    2.14      periodic_next_event = v->periodic_last_event + v->periodic_period;
    2.15  
    2.16 -    /* The timer subsystem may call us up to TIME_SLOP ahead of deadline. */
    2.17 -    if ( (now + TIME_SLOP) > periodic_next_event )
    2.18 +    if ( now >= periodic_next_event )
    2.19      {
    2.20          send_timer_event(v);
    2.21          v->periodic_last_event = now;