qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] timer issue on 1.7.0 and later


From: Peter Maydell
Subject: Re: [Qemu-devel] timer issue on 1.7.0 and later
Date: Thu, 13 Feb 2014 15:36:30 +0000

On 10 February 2014 17:15, Rob Herring <address@hidden> wrote:
> This doesn't appear to be too useful. The AvgLength is large because
> INT64_MAX / GTIMER_SCALE is used as the next timer value when no timer
> is needed.

The code already uses timer_del() when no next timer is needed
(that's the "timer disabled" case in gt_recalc_timer()). We only
set the timer to INT64_MAX / GTIMER_SCALE for the case where the
architecture demands an interrupt occurs in the really distant
future. Admittedly the chances of QEMU still running in 200 years
time are quite low, but it seemed at the time to be better to just
write the code to behave correctly, since I assumed that calling
timer_mod with a large timeout wasn't going to be really more
expensive than calling timer_del. (Looking at the code, we end
up walking the list of timers twice rather than once.)

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]