svcrdma: Use llist for managing cache of recv_ctxts
Use a wait-free mechanism for managing the svc_rdma_recv_ctxts free list. Subsequently, sc_recv_lock can be eliminated. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:

committed by
J. Bruce Fields

parent
d6dfe43ec6
commit
4866073e6d
@@ -42,6 +42,7 @@
|
||||
|
||||
#ifndef SVC_RDMA_H
|
||||
#define SVC_RDMA_H
|
||||
#include <linux/llist.h>
|
||||
#include <linux/sunrpc/xdr.h>
|
||||
#include <linux/sunrpc/svcsock.h>
|
||||
#include <linux/sunrpc/rpc_rdma.h>
|
||||
@@ -107,8 +108,7 @@ struct svcxprt_rdma {
|
||||
struct list_head sc_read_complete_q;
|
||||
struct work_struct sc_work;
|
||||
|
||||
spinlock_t sc_recv_lock;
|
||||
struct list_head sc_recv_ctxts;
|
||||
struct llist_head sc_recv_ctxts;
|
||||
};
|
||||
/* sc_flags */
|
||||
#define RDMAXPRT_CONN_PENDING 3
|
||||
@@ -125,6 +125,7 @@ enum {
|
||||
#define RPCSVC_MAXPAYLOAD_RDMA RPCSVC_MAXPAYLOAD
|
||||
|
||||
struct svc_rdma_recv_ctxt {
|
||||
struct llist_node rc_node;
|
||||
struct list_head rc_list;
|
||||
struct ib_recv_wr rc_recv_wr;
|
||||
struct ib_cqe rc_cqe;
|
||||
|
Reference in New Issue
Block a user