Comment 0 for bug 260138

Revision history for this message
In , Scondas (scondas) wrote :

I have a use case where I need more than 400 connections to a single RedHat
Linux Xorg server with multiple heads and I would like to see Xorg modified to
support this configuration. The problem can be demonstrated by opening 400
xeyes on a computer with two heads (I think that a KDE limitation may prevent
more than 256 on one head). Sun Microsystems engineers have produced private
builds to support up to 1024 connections for Solaris. I have implemented the
following changes to support 512 connections in a private build of 6.8.2:

xc/include/XPoll.h ->

#define XFD_SETSIZE 512
#define XFD_ANYSET(p) \
        ((howmany(FD_SETSIZE, NFDBITS) > 0 && (p)->fds_bits[0]) || \
        (howmany(FD_SETSIZE, NFDBITS) > 1 && (p)->fds_bits[1]) || \
        (howmany(FD_SETSIZE, NFDBITS) > 2 && (p)->fds_bits[2]) || \
        (howmany(FD_SETSIZE, NFDBITS) > 3 && (p)->fds_bits[3]) || \
        (howmany(FD_SETSIZE, NFDBITS) > 4 && (p)->fds_bits[4]) || \
        (howmany(FD_SETSIZE, NFDBITS) > 5 && (p)->fds_bits[5]) || \
        (howmany(FD_SETSIZE, NFDBITS) > 6 && (p)->fds_bits[6]) || \
        (howmany(FD_SETSIZE, NFDBITS) > 7 && (p)->fds_bits[7]) || \
        (howmany(FD_SETSIZE, NFDBITS) > 8 && (p)->fds_bits[8]) || \
        (howmany(FD_SETSIZE, NFDBITS) > 9 && (p)->fds_bits[9]) || \
        (howmany(FD_SETSIZE, NFDBITS) > 10 && (p)->fds_bits[10]) || \
        (howmany(FD_SETSIZE, NFDBITS) > 11 && (p)->fds_bits[11]) || \
        (howmany(FD_SETSIZE, NFDBITS) > 12 && (p)->fds_bits[12]) || \
        (howmany(FD_SETSIZE, NFDBITS) > 13 && (p)->fds_bits[13]) || \
        (howmany(FD_SETSIZE, NFDBITS) > 14 && (p)->fds_bits[14]) || \
        (howmany(FD_SETSIZE, NFDBITS) > 15 && (p)->fds_bits[15]))

The above changes increase the number of file descriptors that are polled for
input.

xc/programs/Xserver/include/misc.h ->

#define MAXCLIENTS 512

The above change increases the number of TCP connections allowed into the
server.

I realize that in 7.2 the XPoll.h is now dynamically constructed, and that the
above changes would need to be folded into the new architecture. Thanks for
looking into this.