IB/iser: Rewrite bounce buffer code path
authorSagi Grimberg <sagig@mellanox.com>
Tue, 14 Apr 2015 15:08:28 +0000 (18:08 +0300)
committerDoug Ledford <dledford@redhat.com>
Wed, 15 Apr 2015 20:07:14 +0000 (16:07 -0400)
commitba943fb237ea48b01e3229f10cdb2a4274978a2d
tree9a722d640df18d6cc23b0eb2e0164d6824f65683
parent4fcd1470a05253236576a2d166ddd6d5b5c936fc
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>
drivers/infiniband/ulp/iser/iscsi_iser.h
drivers/infiniband/ulp/iser/iser_initiator.c
drivers/infiniband/ulp/iser/iser_memory.c