diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-11 18:17:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-11 18:17:41 -0400 |
commit | 1f7563f743d7081710a9d186a8b203997d09f383 (patch) | |
tree | 55091227fb177f25c45f33dfb5f0b2a5e22ccfa7 /net/sunrpc | |
parent | ba6d10ab8014ac10d25ca513352b6665e73b5785 (diff) | |
parent | 3e99b3b13a1fc8f7354edaee4c04f73a07faba69 (diff) |
Merge tag 'scsi-sg' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI scatter-gather list updates from James Bottomley:
"This topic branch covers a fundamental change in how our sg lists are
allocated to make mq more efficient by reducing the size of the
preallocated sg list.
This necessitates a large number of driver changes because the
previous guarantee that if a driver specified SG_ALL as the size of
its scatter list, it would get a non-chained list and didn't need to
bother with scatterlist iterators is now broken and every driver
*must* use scatterlist iterators.
This was broken out as a separate topic because we need to convert all
the drivers before pulling the trigger and unconverted drivers kept
being found, necessitating a rebase"
* tag 'scsi-sg' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (21 commits)
scsi: core: don't preallocate small SGL in case of NO_SG_CHAIN
scsi: lib/sg_pool.c: clear 'first_chunk' in case of no preallocation
scsi: core: avoid preallocating big SGL for data
scsi: core: avoid preallocating big SGL for protection information
scsi: lib/sg_pool.c: improve APIs for allocating sg pool
scsi: esp: use sg helper to iterate over scatterlist
scsi: NCR5380: use sg helper to iterate over scatterlist
scsi: wd33c93: use sg helper to iterate over scatterlist
scsi: ppa: use sg helper to iterate over scatterlist
scsi: pcmcia: nsp_cs: use sg helper to iterate over scatterlist
scsi: imm: use sg helper to iterate over scatterlist
scsi: aha152x: use sg helper to iterate over scatterlist
scsi: s390: zfcp_fc: use sg helper to iterate over scatterlist
scsi: staging: unisys: visorhba: use sg helper to iterate over scatterlist
scsi: usb: image: microtek: use sg helper to iterate over scatterlist
scsi: pmcraid: use sg helper to iterate over scatterlist
scsi: ipr: use sg helper to iterate over scatterlist
scsi: mvumi: use sg helper to iterate over scatterlist
scsi: lpfc: use sg helper to iterate over scatterlist
scsi: advansys: use sg helper to iterate over scatterlist
...
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_rw.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_rw.c b/net/sunrpc/xprtrdma/svc_rdma_rw.c index 2121c9b4d275..48fe3b16b0d9 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_rw.c +++ b/net/sunrpc/xprtrdma/svc_rdma_rw.c | |||
@@ -73,7 +73,8 @@ svc_rdma_get_rw_ctxt(struct svcxprt_rdma *rdma, unsigned int sges) | |||
73 | 73 | ||
74 | ctxt->rw_sg_table.sgl = ctxt->rw_first_sgl; | 74 | ctxt->rw_sg_table.sgl = ctxt->rw_first_sgl; |
75 | if (sg_alloc_table_chained(&ctxt->rw_sg_table, sges, | 75 | if (sg_alloc_table_chained(&ctxt->rw_sg_table, sges, |
76 | ctxt->rw_sg_table.sgl)) { | 76 | ctxt->rw_sg_table.sgl, |
77 | SG_CHUNK_SIZE)) { | ||
77 | kfree(ctxt); | 78 | kfree(ctxt); |
78 | ctxt = NULL; | 79 | ctxt = NULL; |
79 | } | 80 | } |
@@ -84,7 +85,7 @@ out: | |||
84 | static void svc_rdma_put_rw_ctxt(struct svcxprt_rdma *rdma, | 85 | static void svc_rdma_put_rw_ctxt(struct svcxprt_rdma *rdma, |
85 | struct svc_rdma_rw_ctxt *ctxt) | 86 | struct svc_rdma_rw_ctxt *ctxt) |
86 | { | 87 | { |
87 | sg_free_table_chained(&ctxt->rw_sg_table, true); | 88 | sg_free_table_chained(&ctxt->rw_sg_table, SG_CHUNK_SIZE); |
88 | 89 | ||
89 | spin_lock(&rdma->sc_rw_ctxt_lock); | 90 | spin_lock(&rdma->sc_rw_ctxt_lock); |
90 | list_add(&ctxt->rw_list, &rdma->sc_rw_ctxts); | 91 | list_add(&ctxt->rw_list, &rdma->sc_rw_ctxts); |