> been reading the select(2) man pages and it mentions poll(2)
select requires that you set up a bit array correctly. but often
people just use a fd_set, and cause a variety of strange buffer
overflow cases as soon as their fd's happen to be greater than the bit
size of the fd_set.
the kernel has to iterate over these bit arrays a few times.
for everyone involved, poll is just plain cheaper.
finally, go look at the latest commit to lib/libc/net/res_send.c to
see how much easier poll() is to use.
> i've come across some performance benchmarks which is trying
shrug. performance is only a small part of the whole.
> the question is, which one is more useful when writing new servers?
use poll. it is easier to use -- the behaviours are less surprising.
it is also much more portable. everyone has select and poll, and
quite honestly poll() is a better select(), even if it came out of
AT&T.
| Linus Torvalds | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Adrian Bunk | -Os versus -O2 |
git: | |
| Gerrit Renker | [PATCH 28/37] dccp: Integration of dynamic feature activation - part 3 (client side) |
| Arjan van de Ven | Re: [GIT]: Networking |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Jean-Louis Dupond | tg3 driver not advertising 1000mbit |
