>Yet another POSIX deficiency. > >When a server deals with 10,000,000+ socks, we absolutely do not care of >this requirement. > >O(log(n)) is still crazy if it involves O(log(n)) cache misses.
You miss the fire point of the algorithm; you *always* find an available file descriptor in O(log(N)) (where N is the size of the table). Does your algorithm guarantee that? >> Is it a problem that you can "hide" your listening socket with a thread in >> accept()? I would think so (It would be visible in netstat but you can't >> easily find out why has it) > >Again, netstat -p on a server with 10,000,000 sockets never completes. This point was not about a 10M sockets server but in general... >Never try this unless you are desperate and want to avoid a reboot >maybe. > >If you absolutely want to nuke a listener because of untrusted >applications, we better implement a proper syscall. > >Android has such a facility. Solaris has had such an option too, but that wasn't the point. You really don't want to know which application is doing this? >Alternative would be to extend netlink (ss command from iproute2 >package) to carry one pid per socket. > >ss -atnp state listening That would be an option too. Casper -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html