diff options
author | Chuck Lever <cel@netapp.com> | 2006-01-03 03:55:49 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-01-06 14:58:55 -0500 |
commit | 02107148349f31eee7c0fb06fd7a880df73dbd20 (patch) | |
tree | 37bffd81e08b8e50394ce89a1aa7a3961f0ffbe7 /include/linux/sunrpc/xprt.h | |
parent | 03c21733938aad0758f5f88e1cc7ede69fc3c910 (diff) |
SUNRPC: switchable buffer allocation
Add RPC client transport switch support for replacing buffer management
on a per-transport basis.
In the current IPv4 socket transport implementation, RPC buffers are
allocated as needed for each RPC message that is sent. Some transport
implementations may choose to use pre-allocated buffers for encoding,
sending, receiving, and unmarshalling RPC messages, however. For
transports capable of direct data placement, the buffers can be carved
out of a pre-registered area of memory rather than from a slab cache.
Test-plan:
Millions of fsx operations. Performance characterization with "sio" and
"iozone". Use oprofile and other tools to look for significant regression
in CPU utilization.
Signed-off-by: Chuck Lever <cel@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/sunrpc/xprt.h')
-rw-r--r-- | include/linux/sunrpc/xprt.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 3b8b6e823c70..7885b9621ce3 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -79,21 +79,19 @@ struct rpc_rqst { | |||
79 | void (*rq_release_snd_buf)(struct rpc_rqst *); /* release rq_enc_pages */ | 79 | void (*rq_release_snd_buf)(struct rpc_rqst *); /* release rq_enc_pages */ |
80 | struct list_head rq_list; | 80 | struct list_head rq_list; |
81 | 81 | ||
82 | __u32 * rq_buffer; /* XDR encode buffer */ | ||
83 | size_t rq_bufsize; | ||
84 | |||
82 | struct xdr_buf rq_private_buf; /* The receive buffer | 85 | struct xdr_buf rq_private_buf; /* The receive buffer |
83 | * used in the softirq. | 86 | * used in the softirq. |
84 | */ | 87 | */ |
85 | unsigned long rq_majortimeo; /* major timeout alarm */ | 88 | unsigned long rq_majortimeo; /* major timeout alarm */ |
86 | unsigned long rq_timeout; /* Current timeout value */ | 89 | unsigned long rq_timeout; /* Current timeout value */ |
87 | unsigned int rq_retries; /* # of retries */ | 90 | unsigned int rq_retries; /* # of retries */ |
88 | /* | ||
89 | * For authentication (e.g. auth_des) | ||
90 | */ | ||
91 | u32 rq_creddata[2]; | ||
92 | 91 | ||
93 | /* | 92 | /* |
94 | * Partial send handling | 93 | * Partial send handling |
95 | */ | 94 | */ |
96 | |||
97 | u32 rq_bytes_sent; /* Bytes we have sent */ | 95 | u32 rq_bytes_sent; /* Bytes we have sent */ |
98 | 96 | ||
99 | unsigned long rq_xtime; /* when transmitted */ | 97 | unsigned long rq_xtime; /* when transmitted */ |
@@ -107,6 +105,8 @@ struct rpc_xprt_ops { | |||
107 | int (*reserve_xprt)(struct rpc_task *task); | 105 | int (*reserve_xprt)(struct rpc_task *task); |
108 | void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); | 106 | void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); |
109 | void (*connect)(struct rpc_task *task); | 107 | void (*connect)(struct rpc_task *task); |
108 | void * (*buf_alloc)(struct rpc_task *task, size_t size); | ||
109 | void (*buf_free)(struct rpc_task *task); | ||
110 | int (*send_request)(struct rpc_task *task); | 110 | int (*send_request)(struct rpc_task *task); |
111 | void (*set_retrans_timeout)(struct rpc_task *task); | 111 | void (*set_retrans_timeout)(struct rpc_task *task); |
112 | void (*timer)(struct rpc_task *task); | 112 | void (*timer)(struct rpc_task *task); |