[PATCH xserver 1/3] os/WaitFor: Check timers on every iteration

Adam Jackson ajax at nwnk.net
Tue Apr 17 20:32:43 UTC 2018


On Sun, 2018-04-15 at 15:40 +0100, Chris Wilson wrote:
> 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.)
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

11:31 < pharris> "os/WaitFor: Check timers on every iteration" has my 
                 reviewed-by. We've been shipping an equivalent patch for a 
                 while.
11:32 < pharris> I'd reply on-list, but the email server bounced too many 
                 messages and I got auto-unsubscribed.
11:33 < pharris> The other two patches in the series have my r-b too, I guess. 
                 They look like obvious clean-ups.

And indeed they do, but I'm trying to stay cautious as we inch towards
release. So, merged this one, will queue the other two for after
release:

remote: I: patch #217184 updated using rev ac7a4bf44c68c5f323375974b208d4530fb5b60f.
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   78b6f94021..ac7a4bf44c  master -> master

- ajax


More information about the xorg-devel mailing list