OK, I reran with different numbers of fd's, again on a 650 MHz dual PIII SMP.
Times in microseconds to find 1 active pipe out of N total pipes:
number of pipes
kernel 1 8 10000 30000
-----------------------------------------
2.4.0 7 10 14600 45843
2.4.0-pp 5 8 14321 44903
For small N, your patch makes poll() 2 microseconds faster uniformly.
That's a 20-30% speedup, not bad.
Anyone know if this would actually help real-life programs?
BTW, your change makes poll() slightly faster than select().
For large N, your patch speeds poll() up by 2-5%.
(Increasing /proc/sys/fs/file-max to 70000 appears to reduce the speedup.)
I doubt that will have much effect on real-life programs.
- Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/