Eric Dumazet a écrit :Reading again tcp_recvmsg(), I found it already is able to eat several skb even in nonblocking mode. setsockopt(5, SOL_SOCKET, SO_RCVLOWAT, [61440], 4) = 0 ioctl(5, FIONBIO, [1]) = 0 poll([{fd=5, events=POLLIN, revents=POLLIN}], 1, -1) = 1 recv(5, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 65536, MSG_DONTWAIT) = 65536 write(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 65536) = 65536 poll([{fd=5, events=POLLIN, revents=POLLIN}], 1, -1) = 1 recv(5, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 65536, MSG_DONTWAIT) = 65536 write(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 65536) = 65536 poll([{fd=5, events=POLLIN, revents=POLLIN}], 1, -1) = 1 recv(5, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 65536, MSG_DONTWAIT) = 65536 write(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 65536) = 65536 poll([{fd=5, events=POLLIN, revents=POLLIN}], 1, -1) = 1 recv(5, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 65536, MSG_DONTWAIT) = 65536 write(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 65536) = 65536 David, if you referred to code at line 1374 of net/ipv4/tcp.c, I believe there is no issue with it. We really want to break from this loop if !timeo . Willy patch makes splice() behaving like tcp_recvmsg(), but we might call tcp_cleanup_rbuf() several times, with copied=1460 (for each frame processed) I wonder if the right fix should be done in tcp_read_sock() : this is the one who should eat several skbs IMHO, if we want optimal ACK generation. We break out of its loop at line 1246 if (!desc->count) /* this test is always true */ break; (__tcp_splice_read() set count to 0, right before calling tcp_read_sock()) So code at line 1246 (tcp_read_sock()) seems wrong, or pessimistic at least. -- 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
| David Miller | Re: Slow DOWN, please!!! |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Heiko Carstens | Re: -mm merge plans for 2.6.23 -- sys_fallocate |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| Jan Engelhardt | Re: iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49 |
