[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.3] timers: set the deadline more accurately
commit ac62dbd1b6bb84ac6abc751e0be73649c833f70f Author: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx> AuthorDate: Tue Jun 3 12:17:38 2014 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Jun 3 12:17:38 2014 +0200 timers: set the deadline more accurately Program the timer to the deadline of the closest timer if it is further than 50us ahead, otherwise set it 50us ahead. This way a single event fires on time rather than 50us late (as it would have previously) while still preventing too many timer wakeups in the case of having many timers scheduled close together. (where 50us is the timer_slop) Signed-off-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx> master commit: 054b6dfb61eab00d86ddd5d0ac508f5302da0d52 master date: 2014-05-28 10:07:50 +0200 --- xen/common/timer.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/xen/common/timer.c b/xen/common/timer.c index 9ed74e9..b9ed8a3 100644 --- a/xen/common/timer.c +++ b/xen/common/timer.c @@ -492,8 +492,9 @@ static void timer_softirq_action(void) deadline = heap[1]->expires; if ( (ts->list != NULL) && (ts->list->expires < deadline) ) deadline = ts->list->expires; + now = NOW(); this_cpu(timer_deadline) = - (deadline == STIME_MAX) ? 0 : deadline + timer_slop; + (deadline == STIME_MAX) ? 0 : MAX(deadline, now + timer_slop); if ( !reprogram_timer(this_cpu(timer_deadline)) ) raise_softirq(TIMER_SOFTIRQ); -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.3 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |