David Miller a écrit :I found this patch usefull in my testings, but had a feeling something was not complete. If the goal is to reduce number of splice() calls, we also should reduce number of wakeups. If splice() is used in non blocking mode, nothing we can do here of course, since the application will use a poll()/select()/epoll() event before calling splice(). A good setting of SO_RCVLOWAT to (16*PAGE_SIZE)/2 might improve things. I tested this on current tree and it is not working : we still have one wakeup for each frame (ethernet link is a 100 Mb/s one) bind(6, {sa_family=AF_INET, sin_port=htons(4711), sin_addr=inet_addr("0.0.0.0")}, 16) = 0 listen(6, 5) = 0 accept(6, 0, NULL) = 7 setsockopt(7, SOL_SOCKET, SO_RCVLOWAT, [32768], 4) = 0 poll([{fd=7, events=POLLIN, revents=POLLIN|POLLERR|POLLHUP}], 1, -1) = 1 splice(0x7, 0, 0x4, 0, 0x10000, 0x3) = 1024 splice(0x3, 0, 0x5, 0, 0x400, 0x5) = 1024 poll([{fd=7, events=POLLIN, revents=POLLIN|POLLERR|POLLHUP}], 1, -1) = 1 splice(0x7, 0, 0x4, 0, 0x10000, 0x3) = 1460 splice(0x3, 0, 0x5, 0, 0x5b4, 0x5) = 1460 poll([{fd=7, events=POLLIN, revents=POLLIN|POLLERR|POLLHUP}], 1, -1) = 1 splice(0x7, 0, 0x4, 0, 0x10000, 0x3) = 1460 splice(0x3, 0, 0x5, 0, 0x5b4, 0x5) = 1460 poll([{fd=7, events=POLLIN, revents=POLLIN|POLLERR|POLLHUP}], 1, -1) = 1 splice(0x7, 0, 0x4, 0, 0x10000, 0x3) = 1460 splice(0x3, 0, 0x5, 0, 0x5b4, 0x5) = 1460 poll([{fd=7, events=POLLIN, revents=POLLIN|POLLERR|POLLHUP}], 1, -1) = 1 splice(0x7, 0, 0x4, 0, 0x10000, 0x3) = 1460 splice(0x3, 0, 0x5, 0, 0x5b4, 0x5) = 1460 poll([{fd=7, events=POLLIN, revents=POLLIN|POLLERR|POLLHUP}], 1, -1) = 1 splice(0x7, 0, 0x4, 0, 0x10000, 0x3) = 1460 splice(0x3, 0, 0x5, 0, 0x5b4, 0x5) = 1460 About tcp_recvmsg(), we might also remove the "!timeo" test as well, more testings are needed. But remind that if an application provides a large buffer to tcp_recvmsg() call, removing the test will reduce the number of syscalls but might use more DCACHE. It could reduce performance on old cpus. With splice() call, we expect to not copy memory and trash DCACHE, and pipe buffers being limited to 16, we cope with a limited working set. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| debian developer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Eric W. Biederman | Re: [net-2.6.24][patch 2/2] Dynamically allocate the loopback device |
| Sam Ravnborg | Re: [RFC/PATCH] Documentation of kernel messages |
| Andrew Morton | Re: -mm merge plans for 2.6.23 -- sys_fallocate |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| David Miller | Re: [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
