diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-12-11 08:50:13 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-12-11 08:50:13 +0000 |
commit | 768e0ace278a0c08818186bddd953b7f050a23b7 (patch) | |
tree | fc938fa67f384408384e742ea815c9b22e7428c5 /xen/common/timer.c | |
parent | dcf8b0114d60b057d94007dba3ca7f4e758da89c (diff) | |
download | xen-768e0ace278a0c08818186bddd953b7f050a23b7.tar.gz xen-768e0ace278a0c08818186bddd953b7f050a23b7.tar.bz2 xen-768e0ace278a0c08818186bddd953b7f050a23b7.zip |
x86: Allow HPET to set timers more sloppily by seeing each CPU's
acceptable deadline range, rather than just deadline start.
Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/common/timer.c')
-rw-r--r-- | xen/common/timer.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/xen/common/timer.c b/xen/common/timer.c index aaa4f4e18c..5cf61118d5 100644 --- a/xen/common/timer.c +++ b/xen/common/timer.c @@ -38,7 +38,8 @@ struct timers { static DEFINE_PER_CPU(struct timers, timers); -DEFINE_PER_CPU(s_time_t, timer_deadline); +DEFINE_PER_CPU(s_time_t, timer_deadline_start); +DEFINE_PER_CPU(s_time_t, timer_deadline_end); /**************************************************************************** * HEAP OPERATIONS. @@ -425,10 +426,11 @@ static void timer_softirq_action(void) if ( unlikely(ts->overflow) ) { /* Find earliest deadline at head of list or top of heap. */ - this_cpu(timer_deadline) = ts->list->expires; + this_cpu(timer_deadline_start) = ts->list->expires; if ( (GET_HEAP_SIZE(heap) != 0) && - ((t = heap[1])->expires < this_cpu(timer_deadline)) ) - this_cpu(timer_deadline) = t->expires; + ((t = heap[1])->expires < this_cpu(timer_deadline_start)) ) + this_cpu(timer_deadline_start) = t->expires; + this_cpu(timer_deadline_end) = this_cpu(timer_deadline_start); } else { @@ -455,10 +457,11 @@ static void timer_softirq_action(void) end = t->expires_end; } - this_cpu(timer_deadline) = start; + this_cpu(timer_deadline_start) = start; + this_cpu(timer_deadline_end) = end; } - if ( !reprogram_timer(this_cpu(timer_deadline)) ) + if ( !reprogram_timer(this_cpu(timer_deadline_start)) ) raise_softirq(TIMER_SOFTIRQ); spin_unlock_irq(&ts->lock); |