#
5d71899a |
| 08-Jul-2016 |
Frank Sorenson <sorenson@redhat.com> |
sunrpc: Fix reserved port range calculation
The range calculation for choosing the random reserved port will panic with divide-by-zero when min_resvport == max_resvport, a range of one port, not zer
sunrpc: Fix reserved port range calculation
The range calculation for choosing the random reserved port will panic with divide-by-zero when min_resvport == max_resvport, a range of one port, not zero.
Fix the reserved port range calculation by adding one to the difference.
Signed-off-by: Frank Sorenson <sorenson@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
#
39a9beab |
| 17-May-2016 |
J. Bruce Fields <bfields@redhat.com> |
rpc: share one xps between all backchannels
The spec allows backchannels for multiple clients to share the same tcp connection. When that happens, we need to use the same xprt for all of them. Sim
rpc: share one xps between all backchannels
The spec allows backchannels for multiple clients to share the same tcp connection. When that happens, we need to use the same xprt for all of them. Similarly, we need the same xps.
This fixes list corruption introduced by the multipath code.
Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat.com> Acked-by: Trond Myklebust <trondmy@primarydata.com>
show more ...
|
#
9ffadfbc |
| 28-May-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
SUNRPC: Fix suspicious enobufs issues.
The current test is racy when dealing with fast NICs.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
|
#
40a5f1b1 |
| 27-May-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
SUNRPC: RPC transport queue must be low latency
rpciod can easily get congested due to the long list of queued rpc_tasks. Having the receive queue wait in turn for those tasks to complete can theref
SUNRPC: RPC transport queue must be low latency
rpciod can easily get congested due to the long list of queued rpc_tasks. Having the receive queue wait in turn for those tasks to complete can therefore be a bottleneck.
Address the problem by separating the workqueues into: - rpciod: manages rpc_tasks - xprtiod: manages transport related work.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
#
5157b956 |
| 29-May-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
SUNRPC: Consolidate xs_tcp_data_ready and xs_data_ready
The only difference between the two at this point is the reset of the connection timeout, and since everyone expect tcp ignore that value, we
SUNRPC: Consolidate xs_tcp_data_ready and xs_data_ready
The only difference between the two at this point is the reset of the connection timeout, and since everyone expect tcp ignore that value, we can just throw it into the generic function.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
#
42d42a5b |
| 23-May-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
SUNRPC: Small optimisation of client receive
Do not queue the client receive work if we're still processing.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
|
#
6b26cc8c |
| 02-May-2016 |
Chuck Lever <chuck.lever@oracle.com> |
sunrpc: Advertise maximum backchannel payload size
RPC-over-RDMA transports have a limit on how large a backward direction (backchannel) RPC message can be. Ensure that the NFSv4.x CREATE_SESSION op
sunrpc: Advertise maximum backchannel payload size
RPC-over-RDMA transports have a limit on how large a backward direction (backchannel) RPC message can be. Ensure that the NFSv4.x CREATE_SESSION operation advertises this limit to servers.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
show more ...
|
#
b4411457 |
| 12-May-2016 |
Eric Dumazet <edumazet@google.com> |
sunrpc: set SOCK_FASYNC
sunrpc is using SOCKWQ_ASYNC_NOSPACE without setting SOCK_FASYNC, so the recent optimizations done in sk_set_bit() and sk_clear_bit() broke it.
There is still the risk that
sunrpc: set SOCK_FASYNC
sunrpc is using SOCKWQ_ASYNC_NOSPACE without setting SOCK_FASYNC, so the recent optimizations done in sk_set_bit() and sk_clear_bit() broke it.
There is still the risk that a subsequent sock_fasync() call would clear SOCK_FASYNC, but sunrpc does not use this yet.
Fixes: 9317bb69824e ("net: SOCKWQ_ASYNC_NOSPACE optimizations") Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Jiri Pirko <jiri@resnulli.us> Reported-by: Huang, Ying <ying.huang@intel.com> Tested-by: Jiri Pirko <jiri@resnulli.us> Tested-by: Huang, Ying <ying.huang@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
02c22347 |
| 27-Apr-2016 |
Eric Dumazet <edumazet@google.com> |
net: udp: rename UDP_INC_STATS_BH()
Rename UDP_INC_STATS_BH() to __UDP_INC_STATS(), and UDP6_INC_STATS_BH() to __UDP6_INC_STATS()
Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Da
net: udp: rename UDP_INC_STATS_BH()
Rename UDP_INC_STATS_BH() to __UDP_INC_STATS(), and UDP6_INC_STATS_BH() to __UDP6_INC_STATS()
Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
fafc4e1e |
| 08-Apr-2016 |
Hannes Frederic Sowa <hannes@stressinduktion.org> |
sock: tigthen lockdep checks for sock_owned_by_user
sock_owned_by_user should not be used without socket lock held. It seems to be a common practice to check .owned before lock reclassification, so
sock: tigthen lockdep checks for sock_owned_by_user
sock_owned_by_user should not be used without socket lock held. It seems to be a common practice to check .owned before lock reclassification, so provide a little help to abstract this check away.
Cc: linux-cifs@vger.kernel.org Cc: linux-bluetooth@vger.kernel.org Cc: linux-nfs@vger.kernel.org Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
1da8c681 |
| 07-Apr-2016 |
Willem de Bruijn <willemb@google.com> |
sunrpc: do not pull udp headers on receive
Commit e6afc8ace6dd modified the udp receive path by pulling the udp header before queuing an skbuff onto the receive queue.
Sunrpc also calls skb_recv_da
sunrpc: do not pull udp headers on receive
Commit e6afc8ace6dd modified the udp receive path by pulling the udp header before queuing an skbuff onto the receive queue.
Sunrpc also calls skb_recv_datagram to dequeue an skb from a udp socket. Modify this receive path to also no longer expect udp headers.
Fixes: e6afc8ace6dd ("udp: remove headers from UDP packets before queueing")
Reported-by: Franklin S Cooper Jr. <fcooper@ti.com> Signed-off-by: Willem de Bruijn <willemb@google.com> Tested-by: Thierry Reding <treding@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
fb43d172 |
| 30-Jan-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
SUNRPC: Use the multipath iterator to assign a transport to each task
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
|
#
13331a55 |
| 06-Jan-2016 |
Trond Myklebust <trond.myklebust@primarydata.com> |
SUNRPC: Fixup socket wait for memory
We're seeing hangs in the NFS client code, with loops of the form:
RPC: 30317 xmit incomplete (267368 left of 524448) RPC: 30317 call_status (status -11) RPC
SUNRPC: Fixup socket wait for memory
We're seeing hangs in the NFS client code, with loops of the form:
RPC: 30317 xmit incomplete (267368 left of 524448) RPC: 30317 call_status (status -11) RPC: 30317 call_transmit (status 0) RPC: 30317 xprt_prepare_transmit RPC: 30317 xprt_transmit(524448) RPC: xs_tcp_send_request(267368) = -11 RPC: 30317 xmit incomplete (267368 left of 524448) RPC: 30317 call_status (status -11) RPC: 30317 call_transmit (status 0) RPC: 30317 xprt_prepare_transmit RPC: 30317 xprt_transmit(524448)
Turns out commit ceb5d58b2170 ("net: fix sock_wake_async() rcu protection") moved SOCKWQ_ASYNC_NOSPACE out of sock->flags and into sk->sk_wq->flags, however it never tried to fix up the code in net/sunrpc.
The new idiom is to use the flags in the RCU protected struct socket_wq. While we're at it, clear out the now redundant places where we set/clear SOCKWQ_ASYNC_NOSPACE and SOCK_NOSPACE. In principle, sk_stream_wait_memory() is supposed to set these for us, so we only need to clear them in the particular case of our ->write_space() callback.
Fixes: ceb5d58b2170 ("net: fix sock_wake_async() rcu protection") Cc: Eric Dumazet <edumazet@google.com> Cc: stable@vger.kernel.org # 4.4 Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
#
d1358917 |
| 02-Dec-2015 |
Stefan Hajnoczi <stefanha@redhat.com> |
SUNRPC: drop unused xs_reclassify_socketX() helpers
xs_reclassify_socket4() and friends used to be called directly. xs_reclassify_socket() is called instead nowadays.
The xs_reclassify_socketX() he
SUNRPC: drop unused xs_reclassify_socketX() helpers
xs_reclassify_socket4() and friends used to be called directly. xs_reclassify_socket() is called instead nowadays.
The xs_reclassify_socketX() helper functions are empty when CONFIG_DEBUG_LOCK_ALLOC is not defined. Drop them since they have no callers.
Note that AF_LOCAL still calls xs_reclassify_socketu() directly but is easily converted to generic xs_reclassify_socket().
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
#
9cd3e072 |
| 29-Nov-2015 |
Eric Dumazet <edumazet@google.com> |
net: rename SOCK_ASYNC_NOSPACE and SOCK_ASYNC_WAITDATA
This patch is a cleanup to make following patch easier to review.
Goal is to move SOCK_ASYNC_NOSPACE and SOCK_ASYNC_WAITDATA from (struct sock
net: rename SOCK_ASYNC_NOSPACE and SOCK_ASYNC_WAITDATA
This patch is a cleanup to make following patch easier to review.
Goal is to move SOCK_ASYNC_NOSPACE and SOCK_ASYNC_WAITDATA from (struct socket)->flags to a (struct socket_wq)->flags to benefit from RCU protection in sock_wake_async()
To ease backports, we rename both constants.
Two new helpers, sk_set_bit(int nr, struct sock *sk) and sk_clear_bit(int net, struct sock *sk) are added so that following patch can change their implementation.
Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
7fc56136 |
| 24-Sep-2015 |
Andrzej Hajda <a.hajda@samsung.com> |
SUNRPC: fix variable type
Due to incorrect len type bc_send_request returned always zero.
The problem has been detected using proposed semantic patch scripts/coccinelle/tests/assign_signed_to_unsig
SUNRPC: fix variable type
Due to incorrect len type bc_send_request returned always zero.
The problem has been detected using proposed semantic patch scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1].
[1]: http://permalink.gmane.org/gmane.linux.kernel/2046107
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
#
76566773 |
| 24-Oct-2015 |
Chuck Lever <chuck.lever@oracle.com> |
NFS: Enable client side NFSv4.1 backchannel to use other transports
Forechannel transports get their own "bc_up" method to create an endpoint for the backchannel service.
Signed-off-by: Chuck Lever
NFS: Enable client side NFSv4.1 backchannel to use other transports
Forechannel transports get their own "bc_up" method to create an endpoint for the backchannel service.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com> [Anna Schumaker: Add forward declaration of struct net to xprt.h] Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
show more ...
|
#
42e5c3e2 |
| 24-Oct-2015 |
Chuck Lever <chuck.lever@oracle.com> |
SUNRPC: Abstract backchannel operations
xprt_{setup,destroy}_backchannel() won't be adequate for RPC/RMDA bi-direction. In particular, receive buffers have to be pre- registered and posted in order
SUNRPC: Abstract backchannel operations
xprt_{setup,destroy}_backchannel() won't be adequate for RPC/RMDA bi-direction. In particular, receive buffers have to be pre- registered and posted in order to receive incoming backchannel requests.
Add a virtual function call to allow the insertion of appropriate backchannel setup and destruction methods for each transport.
In addition, freeing a backchannel request is a little different for RPC/RDMA. Introduce an rpc_xprt_op to handle the difference.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Sagi Grimberg <sagig@mellanox.com> Tested-By: Devesh Sharma <devesh.sharma@avagotech.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
show more ...
|
#
31303d6c |
| 06-Oct-2015 |
Trond Myklebust <trond.myklebust@primarydata.com> |
SUNRPC: Use MSG_SENDPAGE_NOTLAST in xs_send_pagedata()
If we're sending more than one page via kernel_sendpage(), then set MSG_SENDPAGE_NOTLAST between the pages so that we don't send suboptimal fra
SUNRPC: Use MSG_SENDPAGE_NOTLAST in xs_send_pagedata()
If we're sending more than one page via kernel_sendpage(), then set MSG_SENDPAGE_NOTLAST between the pages so that we don't send suboptimal frames (see commit 2f5338442425 and commit 35f9c09fe9c7).
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
#
a2648094 |
| 06-Oct-2015 |
Trond Myklebust <trond.myklebust@primarydata.com> |
SUNRPC: Move AF_LOCAL receive data path into a workqueue context
Now that we've done it for TCP and UDP, let's convert AF_LOCAL as well.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.
SUNRPC: Move AF_LOCAL receive data path into a workqueue context
Now that we've done it for TCP and UDP, let's convert AF_LOCAL as well.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
#
f9b2ee71 |
| 06-Oct-2015 |
Trond Myklebust <trond.myklebust@primarydata.com> |
SUNRPC: Move UDP receive data path into a workqueue context
Now that we've done it for TCP, let's convert UDP as well.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
|
#
edc1b01c |
| 05-Oct-2015 |
Trond Myklebust <trond.myklebust@primarydata.com> |
SUNRPC: Move TCP receive data path into a workqueue context
Stream protocols such as TCP can often build up a backlog of data to be read due to ordering. Combine this with the fact that some workloa
SUNRPC: Move TCP receive data path into a workqueue context
Stream protocols such as TCP can often build up a backlog of data to be read due to ordering. Combine this with the fact that some workloads such as NFS read()-intensive workloads need to receive a lot of data per RPC call, and it turns out that receiving the data from inside a softirq context can cause starvation.
The following patch moves the TCP data receive into a workqueue context. We still end up calling tcp_read_sock(), but we do so from a process context, meaning that softirqs are enabled for most of the time.
With this patch, I see a doubling of read bandwidth when running a multi-threaded iozone workload between a virtual client and server setup.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
#
66d7a56a |
| 05-Oct-2015 |
Trond Myklebust <trond.myklebust@primarydata.com> |
SUNRPC: Refactor TCP receive
Move the TCP data receive loop out of xs_tcp_data_ready(). Doing so will allow us to move the data receive out of the softirq context in a set of followup patches.
Sign
SUNRPC: Refactor TCP receive
Move the TCP data receive loop out of xs_tcp_data_ready(). Doing so will allow us to move the data receive out of the softirq context in a set of followup patches.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
#
4b0ab51d |
| 18-Sep-2015 |
Trond Myklebust <trond.myklebust@primarydata.com> |
SUNRPC: xs_sock_mark_closed() does not need to trigger socket autoclose
Under all conditions, it should be quite sufficient just to mark the socket as disconnected. It will then be closed by the tra
SUNRPC: xs_sock_mark_closed() does not need to trigger socket autoclose
Under all conditions, it should be quite sufficient just to mark the socket as disconnected. It will then be closed by the transport shutdown or reconnect code.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|
#
0fdea1e8 |
| 16-Sep-2015 |
Trond Myklebust <trond.myklebust@primarydata.com> |
SUNRPC: Ensure that we wait for connections to complete before retrying
Commit 718ba5b87343, moved the responsibility for unlocking the socket to xs_tcp_setup_socket, meaning that the socket will be
SUNRPC: Ensure that we wait for connections to complete before retrying
Commit 718ba5b87343, moved the responsibility for unlocking the socket to xs_tcp_setup_socket, meaning that the socket will be unlocked before we know that it has finished trying to connect. The following patch is based on an initial patch by Russell King to ensure that we delay clearing the XPRT_CONNECTING flag until we either know that we failed to initiate a connection attempt, or the connection attempt itself failed.
Fixes: 718ba5b87343 ("SUNRPC: Add helpers to prevent socket create from racing") Reported-by: Russell King <linux@arm.linux.org.uk> Reported-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
show more ...
|