On Fri, 2012-06-15 at 13:37 +0800, Li Yu wrote:
Of course, I think that implementing them should not be a hard work :)
Em. I really do not know whether it is necessary to introduce to a new
syscall here. An alternative solution to add new socket option to handle
such batch requirement, so applications also can detect if kernel has
this extended ability with a easy getsockopt() call.
Any way, I am going to try to write a prototype first.
Before that, could you post the result of "perf top", or "perf
record ...;perf report"
The top shows the kernel is most cpu hog, the testing is simple,
just a accept() -> epoll_ctl(ADD) loop, the ratio of cpu util sys% to
si% is about 2:5.
This ratio is not meaningful, if we dont know where time is spent.
I doubt epoll_ctl(ADD) is a problem here...
If it is, batching the fds wont speed the thing anyway...
I believe accept() is the problem here, because it contends with the
softirq processing the tcp session handshake.