IB/srp: adjust can_queue
Subsystems (2)
PATCH 3/4 IB/srp: adjust can_queue
Makes sure that the SCSI mid-layer never tries to queue more than (SRP request limit) - 1 SCSI commands. Improves performance for targets whose request limit is less than or equal to SRP_SQ_REQ_SIZE (63) by reducing the number of BUSY responses.
--- drivers/infiniband/ulp/srp/ib_srp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/infiniband/ulp/srp/ib_srp.c +1 -1
@@ -1436,7 +1436,7 @@ static int srp_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event) target->max_ti_iu_len =be32_to_cpu (rsp->max_ti_iu_len); target->req_lim =be32_to_cpu (rsp->req_lim_delta); - target->scsi_host->can_queue =min (target->req_lim, + target->scsi_host->can_queue =min (target->req_lim -1 , target->scsi_host->can_queue); }else { shost_printk(KERN_WARNING, target->scsi_host,
Signature · 6 lines
1.6.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines · Bart Van Assche
Makes sure that the SCSI mid-layer never tries to queue more than (SRP request limit) - 1 SCSI commands. Improves performance for targets whose request limit is less than or equal to
SRP_SQ_REQ_SIZE(63) by reducing the number of BUSY responses.
This is a better commit message, but why is it important to be less than SRP_REQ_SQ_SIZE or (SRP request limit) - 1 commands?
You and I know that it is because we reserve one credit for sending task management requests, but will future readers?
On that topic, I wonder if we should have a comment there, since we'll otherwise have a magic number.
Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html