On Sat, 7 Apr 2018 11:30:14 -0700 James Smart <jsmart2021@xxxxxxxxx> wrote: > The max_scsicmpl_time parameter can be used to perform scsi cmd queue > depth mgmt based on io completion time: the queue depth is reduced to > make completion time shorter. However, as soon as an io completes and > the completion time is within limits, the code immediately bumps the > queue depth limit back up to the target queue depth. Thus the > procedure restarts, effectively limiting the usefulness of adjusting > queue depth to help completion time. > > This patch makes the following changes: > Removes the code at io completion that resets the queue depth as soon > as within limits. > As the code removed was where the target queue depth was first > applied, change target queue depth application so that it occurs when > the parameter is changed. > Makes target queue depth a standard parameter: both a module parameter > and a sysfs parameter. > Optimizes the command pending count by using atomics rather than > locks. Updates the debugfs nodelist stats to allow better debugging > of pending command counts. > > Signed-off-by: Dick Kennedy <dick.kennedy@xxxxxxxxxxxx> > Signed-off-by: James Smart <james.smart@xxxxxxxxxxxx> > --- > drivers/scsi/lpfc/lpfc.h | 2 -- > drivers/scsi/lpfc/lpfc_attr.c | 45 > ++++++++++++++++++++++++++++++++++++++-- > drivers/scsi/lpfc/lpfc_debugfs.c | 20 ++++++++++++++++-- > drivers/scsi/lpfc/lpfc_scsi.c | 19 +++++------------ 4 files > changed, 66 insertions(+), 20 deletions(-) > Reviewed-by: Hannes Reinecke <hare@xxxxxxxx> Cheers, Hannes