summaryrefslogtreecommitdiff
path: root/drivers/infiniband/ulp/iser/iscsi_iser.h
diff options
context:
space:
mode:
authorSagi Grimberg <sagig@mellanox.com>2015-04-14 18:08:28 +0300
committerDoug Ledford <dledford@redhat.com>2015-04-15 16:07:14 -0400
commitba943fb237ea48b01e3229f10cdb2a4274978a2d (patch)
tree9a722d640df18d6cc23b0eb2e0164d6824f65683 /drivers/infiniband/ulp/iser/iscsi_iser.h
parent4fcd1470a05253236576a2d166ddd6d5b5c936fc (diff)
IB/iser: Rewrite bounce buffer code path
In some rare cases, IO operations may be not aligned to page boundaries. This prevents iser from performing fast memory registration. In order to overcome that iser uses a bounce buffer to carry the transaction. We basically allocate a buffer in the size of the transaction and perform a copy. The buffer allocation using kmalloc is too restrictive since it requires higher order (atomic) allocations for large transactions (which may result in memory exhaustion fairly fast for some workloads). We rewrite the bounce buffer code path to allocate scattered pages and perform a copy between the transaction sg and the bounce sg. Reported-by: Alex Lyakas <alex@zadarastorage.com> Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/iser/iscsi_iser.h')
-rw-r--r--drivers/infiniband/ulp/iser/iscsi_iser.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h
index a39645a54d82..262ba1f8ee50 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.h
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.h
@@ -222,12 +222,9 @@ enum iser_data_dir {
* @size: num entries of this sg
* @data_len: total beffer byte len
* @dma_nents: returned by dma_map_sg
- * @copy_buf: allocated copy buf for SGs unaligned
- * for rdma which are copied
* @orig_sg: pointer to the original sg list (in case
* we used a copy)
- * @sg_single: SG-ified clone of a non SG SC or
- * unaligned SG
+ * @orig_size: num entris of orig sg list
*/
struct iser_data_buf {
struct scatterlist *sg;
@@ -235,8 +232,7 @@ struct iser_data_buf {
unsigned long data_len;
unsigned int dma_nents;
struct scatterlist *orig_sg;
- char *copy_buf;
- struct scatterlist sg_single;
+ unsigned int orig_size;
};
/* fwd declarations */