IB/srp: Reduce number of BUSY conditions
Subsystems (2)
PATCH v5 3/3 IB/srp: Reduce number of BUSY conditions
As proposed by the SRP (draft) standard, ib_srp reserves one ring element for SRP_TSK_MGMT requests. This patch makes sure that the SCSI mid-layer never tries to queue more than (SRP request limit) - 1 SCSI commands to ib_srp. This improves performance for targets whose request limit is less than or equal to SRP_NORMAL_REQ_SQ_SIZE (62) by reducing the number of BUSY responses reported by ib_srp to the SCSI mid-layer.
--- drivers/infiniband/ulp/srp/ib_srp.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
drivers/infiniband/ulp/srp/ib_srp.c +7 -2
@@ -1376,8 +1376,13 @@ 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); +/* +* Set can_queue such that the SCSI mid-layer +* never causes __srp_get_tx_iu() to fail. +*/ + target->scsi_host->can_queue + =min (target->req_lim -SRP_TASK_MGMT_SQ_SIZE , + target->scsi_host->can_queue); }else {shost_printk (KERN_WARNING , target->scsi_host,PFX "Unhandled RSP opcode %#x\n" , opcode);
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]
drivers/infiniband/ulp/srp/ib_srp.c static int srp_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event) · line 1385
Quoted 9 lines · Bart Van Assche
drivers/infiniband/ulp/srp/ib_srp.c +7
-2- target->scsi_host->can_queue =min (target->req_lim, - target->scsi_host->can_queue); +/* +* Set can_queue such that the SCSI mid-layer +* never causes __srp_get_tx_iu() to fail. +*/ + target->scsi_host->can_queue + =min (target->req_lim -SRP_TASK_MGMT_SQ_SIZE , + target->scsi_host->can_queue);
/*
* Reserve credits for task management so we don't
* needlessly bounce requests back to the SCSI mid-layer */
--
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