Commit 509c5f33 authored by Bart Van Assche's avatar Bart Van Assche Committed by Doug Ledford

IB/srp: Prevent mapping failures

If both max_sectors and the queue_depth are high enough it can
happen that the MR pool is depleted temporarily. This causes
the SRP initiator to report mapping failures. Although the SRP
initiator recovers from such mapping failures, prevent that
this can happen by allocating more memory regions.

Additionally, only enable memory registration if at least two
pages can be registered per memory region.
Reported-by: default avatarLaurence Oberman <loberman@redhat.com>
Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
Tested-by: default avatarLaurence Oberman <loberman@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 835ee624
This diff is collapsed.
...@@ -203,6 +203,7 @@ struct srp_target_port { ...@@ -203,6 +203,7 @@ struct srp_target_port {
unsigned int scsi_id; unsigned int scsi_id;
unsigned int sg_tablesize; unsigned int sg_tablesize;
int mr_pool_size; int mr_pool_size;
int mr_per_cmd;
int queue_size; int queue_size;
int req_ring_size; int req_ring_size;
int comp_vector; int comp_vector;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment