[PATCH 2/3] os: Don't limit MaxClients to MAXCLIENTS

Adam Jackson ajax at nwnk.net
Tue Dec 15 06:32:58 PST 2009


On Mon, 2009-12-14 at 14:39 -0800, Keith Packard wrote:
> On Mon, 14 Dec 2009 15:19:48 -0500, Adam Jackson <ajax at redhat.com> wrote:
> 
> > -	    i = Select (MaxClients, &LastSelectMask, &clientsWritable, NULL, wt);
> > +	    i = Select (MaxClientFd, &LastSelectMask, &clientsWritable,
> > NULL, wt);
> 
> Isn't this more like 'MaxFd'? It should include listen sockets and
> devices too, right?

Well, not devices, at least not for silken-enabled servers.  But yes.
And right now, it does; MaxClientFd ends up being getdtablesize()-1,
which is all the file descriptors you can pass to select.

I considered trying to keep MaxClientFd clamped to the smallest correct
number in a second patch, but it looks to be literally not worth the
effort.  I could not measure the difference between MaxClientFd of 1024
and of 16 in x11perf -noop on a recentish laptop.  Would be interesting
to know the numbers on a less macho device though.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://lists.x.org/archives/xorg-devel/attachments/20091215/c57f09c9/attachment.pgp 


More information about the xorg-devel mailing list