[PATCH xserver] FlushAllOutput: Only call FlushCallbacks when actually flushing data

Adam Jackson ajax at nwnk.net
Tue Jul 12 14:43:08 UTC 2016


On Mon, 2016-07-11 at 12:32 -0400, Peter Harris wrote:
> On 2016-07-08 16:33, Keith Packard wrote:
> > Adam Jackson <ajax at nwnk.net> writes:
> > 
> > > Still not cool with committing code that we _know_ will break a
> > > supported platform.
> > 
> > Oh, right, windows. Hrm. Suggestions welcome, but I suspect the only
> > workable solution will be to write some windows-specific code that does
> > the wait for multiple objects thing. We can't use select because the
> > fd_set data structure, while 'poll-like', has a fixed number of fds, and
> > we can't use poll because it's broken.
> 
> The number of fds in fd_set isn't really fixed. FD_SETSIZE is user
> controlled,

This does appear to be true of Windows, where fd_set is a self-
describing struct and not just an array of bits. Definitely not the
case for Linux, but that doesn't matter here.

Here's an epoll branch rebased to master, with poll emulation for
Windows, and a pair of proof-of-concept patches at the end to allow
(force) testing on pollful systems:

https://cgit.freedesktop.org/~ajax/xserver/log/?h=epoll

I tested this with 32 parallel x11perf -noop's on Linux, and while it
does work, reliable numbers are a bit hard to come by. The x11perf
processes take (wildly) varying amounts of time to complete, such that
the last few runs to complete show inflated nop dispatch rates because
they're competing with fewer clients. I don't know yet how much of that
is X's scheduler and how much is the kernel's. 

- ajax


More information about the xorg-devel mailing list