diff mbox series

[v1,2/2] SUNRPC: Inline xdr_commit_encode

Message ID 20190806155206.9332.51158.stgit@manet.1015granger.net (mailing list archive)
State New, archived
Headers show
Series Two short subjects | expand

Commit Message

Chuck Lever Aug. 6, 2019, 3:52 p.m. UTC
Micro-optimization: For xdr_commit_encode call sites in
net/sunrpc/xdr.c, eliminate the extra calling sequence.  On my
client, this change saves about a microsecond for every 30 calls
to xdr_reserve_space().

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 net/sunrpc/xdr.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
index 48c93b9..7ba0ede 100644
--- a/net/sunrpc/xdr.c
+++ b/net/sunrpc/xdr.c
@@ -560,7 +560,7 @@  void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p,
  * required at the end of encoding, or any other time when the xdr_buf
  * data might be read.
  */
-void xdr_commit_encode(struct xdr_stream *xdr)
+inline void xdr_commit_encode(struct xdr_stream *xdr)
 {
 	int shift = xdr->scratch.iov_len;
 	void *page;