• Chris Wilson's avatar
    os/WaitFor: Check timers on every iteration · ac7a4bf4
    Chris Wilson authored
    Currently we only check timer expiry if there are no client fd (or
    other input) waiting to be serviced. This makes it very easy to starve
    the timers with long request queues, and so miss critical timestamps.
    
    The timer subsystem is just another input waiting to be serviced, so
    evaluate it on every loop like all the others, at the cost of calling
    GetTimeInMillis() slightly more frequently. (A more invasive and likely
    OS specific alternative would be to move the timer wheel to the local
    equivalent of timerfd, and treat it as an input fd to the event loop
    exactly equivalent to all the others, and so also serviced on every
    pass. The trade-off being that the kernel timer wheel is likely more
    efficiently integrated with epoll, but individual updates to each timer
    would then require syscalls.)
    Reviewed-by: 's avatarPeter Harris <pharris@opentext.com>
    Signed-off-by: 's avatarChris Wilson <chris@chris-wilson.co.uk>
    ac7a4bf4
Name
Last commit
Last update
..
.gitignore Loading commit data...
Makefile.am Loading commit data...
WaitFor.c Loading commit data...
access.c Loading commit data...
auth.c Loading commit data...
backtrace.c Loading commit data...
busfault.c Loading commit data...
client.c Loading commit data...
connection.c Loading commit data...
inputthread.c Loading commit data...
io.c Loading commit data...
log.c Loading commit data...
meson.build Loading commit data...
mitauth.c Loading commit data...
oscolor.c Loading commit data...
osdep.h Loading commit data...
osinit.c Loading commit data...
ospoll.c Loading commit data...
ospoll.h Loading commit data...
reallocarray.c Loading commit data...
rpcauth.c Loading commit data...
strcasecmp.c Loading commit data...
strcasestr.c Loading commit data...
strlcat.c Loading commit data...
strlcpy.c Loading commit data...
strndup.c Loading commit data...
timingsafe_memcmp.c Loading commit data...
utils.c Loading commit data...
xdmauth.c Loading commit data...
xdmcp.c Loading commit data...
xprintf.c Loading commit data...
xserver_poll.c Loading commit data...
xsha1.c Loading commit data...
xstrans.c Loading commit data...