Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1482820
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH net-next 04/10] rxrpc: Requeue call for recvmsg if more data |
| Date | 2016-09-14 00:30 +0200 |
| Message-ID | <sh4ng-823-29@gated-at.bofh.it> (permalink) |
| References | <sh4nf-823-3@gated-at.bofh.it> |
| Organization | Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 |
rxrpc_recvmsg() needs to make sure that the call it has just been processing gets requeued for further attention if the buffer has been filled and there's more data to be consumed. The softirq producer only queues the call and wakes the socket if it fills the first slot in the window, so userspace might end up sleeping forever otherwise, despite there being data available. This is not a problem provided the userspace buffer is big enough or it empties the buffer completely before more data comes in. Signed-off-by: David Howells <dhowells@redhat.com> --- net/rxrpc/recvmsg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/rxrpc/recvmsg.c b/net/rxrpc/recvmsg.c index 20d0b5c6f81b..16ff56f69256 100644 --- a/net/rxrpc/recvmsg.c +++ b/net/rxrpc/recvmsg.c @@ -463,6 +463,10 @@ try_again: flags, &copied); if (ret == -EAGAIN) ret = 0; + + if (after(call->rx_top, call->rx_hard_ack) && + call->rxtx_buffer[(call->rx_hard_ack + 1) & RXRPC_RXTX_BUFF_MASK]) + rxrpc_notify_socket(call); break; default: ret = 0;
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next 00/10] rxrpc: Miscellaneous fixes David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 [PATCH net-next 05/10] rxrpc: Add missing unlock in rxrpc_call_accept() David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 [PATCH net-next 01/10] rxrpc: Make sure we initialise the peer hash key David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 [PATCH net-next 03/10] rxrpc: The IDLE ACK packet should use rxrpc_idle_ack_delay David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 [PATCH net-next 10/10] rxrpc: Correctly initialise, limit and transmit call->rx_winsize David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 [PATCH net-next 06/10] rxrpc: Use skb->len not skb->data_len David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 [PATCH net-next 04/10] rxrpc: Requeue call for recvmsg if more data David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 [PATCH net-next 09/10] rxrpc: Fix prealloc refcounting David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 [PATCH net-next 08/10] rxrpc: Adjust the call ref tracepoint to show kernel API refs David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 [PATCH net-next 07/10] rxrpc: Allow tx_winsize to grow in response to an ACK David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 Re: [PATCH net-next 00/10] rxrpc: Miscellaneous fixes David Miller <davem@davemloft.net> - 2016-09-16 08:00 +0200
csiph-web