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
| Steven Rostedt | Re: Major regression on hackbench with SLUB |
| Jeremy Fitzhardinge | [PATCH 02 of 36] x86: add memory clobber to save/loadsegment |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Paul Jackson | Re: cpuset-remove-sched-domain-hooks-from-cpusets |
git: | |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Arjan van de Ven | Re: [GIT]: Networking |
| Gerrit Renker | [PATCH 03/37] dccp: List management for new feature negotiation |
| Jarek Poplawski | [PATCH iproute2] Re: HTB accuracy for high speed |
