linux/net/sunrpc
Ming Lei 4635873c56 scsi: lib/sg_pool.c: improve APIs for allocating sg pool
sg_alloc_table_chained() currently allows the caller to provide one
preallocated SGL and returns if the requested number isn't bigger than
size of that SGL. This is used to inline an SGL for an IO request.

However, scattergather code only allows that size of the 1st preallocated
SGL to be SG_CHUNK_SIZE(128). This means a substantial amount of memory
(4KB) is claimed for the SGL for each IO request. If the I/O is small, it
would be prudent to allocate a smaller SGL.

Introduce an extra parameter to sg_alloc_table_chained() and
sg_free_table_chained() for specifying size of the preallocated SGL.

Both __sg_free_table() and __sg_alloc_table() assume that each SGL has the
same size except for the last one.  Change the code to allow both functions
to accept a variable size for the 1st preallocated SGL.

[mkp: attempted to clarify commit desc]

Cc: Christoph Hellwig <hch@lst.de>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Ewan D. Milne <emilne@redhat.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: netdev@vger.kernel.org
Cc: linux-nvme@lists.infradead.org
Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-06-20 15:21:33 -04:00
..
auth_gss This pull consists mostly of nfsd container work: 2019-05-15 18:21:43 -07:00
xprtrdma scsi: lib/sg_pool.c: improve APIs for allocating sg pool 2019-06-20 15:21:33 -04:00
addr.c
auth_null.c SUNRPC: Add rpc_auth::au_ralign field 2019-02-14 11:48:36 -05:00
auth_unix.c SUNRPC: Use the client user namespace when encoding creds 2019-04-26 16:24:32 -04:00
auth.c SUNRPC: Use struct xdr_stream when decoding RPC Reply header 2019-02-14 09:11:18 -05:00
backchannel_rqst.c SUNRPC: Allow dynamic allocation of back channel slots 2019-03-02 16:25:26 -05:00
cache.c sunrpc/cache: handle missing listeners better. 2019-04-24 09:46:34 -04:00
clnt.c SUNRPC: task should be exit if encode return EKEYEXPIRED more times 2019-05-09 16:26:56 -04:00
debugfs.c SUNRPC: Fix up tracking of timeouts 2019-04-25 14:18:13 -04:00
Kconfig SUNRPC: Add build option to disable support for insecure enctypes 2019-02-13 13:33:12 -05:00
Makefile SUNRPC: remove generic cred code. 2018-12-19 13:52:46 -05:00
netns.h
rpc_pipe.c rpcpipe: switch to ->free_inode() 2019-05-01 22:43:26 -04:00
rpcb_clnt.c SUNRPC: Cache cred of process creating the rpc_client 2019-04-26 16:00:48 -04:00
sched.c SUNRPC: Declare RPC timers as TIMER_DEFERRABLE 2019-04-25 14:18:13 -04:00
socklib.c SUNRPC: Avoid digging into the ATOMIC pool 2019-04-25 14:58:35 -04:00
stats.c sunrpc: whitespace fixes 2018-07-31 12:53:40 -04:00
sunrpc_syms.c
sunrpc.h sunrpc: whitespace fixes 2018-07-31 12:53:40 -04:00
svc_xprt.c SUNRPC: Temporary sockets should inherit the cred from their parent 2019-04-24 09:46:35 -04:00
svc.c SUNRPC: Allow further customisation of RPC program registration 2019-04-24 09:46:35 -04:00
svcauth_unix.c SUNRPC: Fix the server AUTH_UNIX userspace mappings 2019-04-24 09:46:35 -04:00
svcauth.c SUNRPC: Add lockless lookup of the server's auth domain 2018-10-03 11:32:59 -04:00
svcsock.c SUNRPC: Cache the process user cred in the RPC server listener 2019-04-24 09:46:35 -04:00
sysctl.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
timer.c
xdr.c NFS: Account for XDR pad of buf->pages 2019-02-14 10:13:49 -05:00
xprt.c SUNRPC: Update comments based on recent changes 2019-04-25 15:38:02 -04:00
xprtmultipath.c SUNRPC: Fix some kernel doc complaints 2019-01-02 12:05:18 -05:00
xprtsock.c SUNRPC: Add tracking of RPC level errors 2019-04-25 14:18:13 -04:00