Message ID | 1664528184-162714-1-git-send-email-john.garry@huawei.com |
---|---|
Headers | show |
Series | scsi: libsas: Use request tag in more drivers | expand |
On 2022/9/30 16:56, John Garry wrote: > blk-mq already provides a unique tag per request. Some libsas LLDDs - like > hisi_sas - already use this tag as the unique per-IO HW tag. > > Add a common function to provide the request associated with a sas_task > for all libsas LLDDs. > > Signed-off-by: John Garry<john.garry@huawei.com> > --- > include/scsi/libsas.h | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) Reviewed-by: Jason Yan <yanaijie@huawei.com>
On 30/09/2022 11:20, John Garry wrote: > BTW, I do notice that we still have this global lock in delivery path > which should be removed at some stage: > > int mvs_queue_command(struct sas_task *task, gfp_t gfp_flags) > { > ... > > spin_lock_irqsave(&mvi->lock, flags); > rc = mvs_task_prep(task, mvi, is_tmf, tmf, &pass); > ... > spin_unlock_irqrestore(&mvi->lock, flags); > } > oops... that's mvsas. But pm8001 does still use a big lock (which we should get rid off): int pm8001_queue_command(struct sas_task *task, gfp_t gfp_flags) { ... pm8001_dbg(pm8001_ha, IO, "pm8001_task_exec device\n"); spin_lock_irqsave(&pm8001_ha->lock, flags); Thanks, John > That really will affect performance...
On Fri, Sep 30, 2022 at 1:05 PM John Garry <john.garry@huawei.com> wrote: > > On 30/09/2022 11:20, John Garry wrote: > > BTW, I do notice that we still have this global lock in delivery path > > which should be removed at some stage: > > > int mvs_queue_command(struct sas_task *task, gfp_t gfp_flags) > > { > > ... > > > > spin_lock_irqsave(&mvi->lock, flags); > > rc = mvs_task_prep(task, mvi, is_tmf, tmf, &pass); > > ... > > spin_unlock_irqrestore(&mvi->lock, flags); > > } > > > > oops... that's mvsas. But pm8001 does still use a big lock (which we > should get rid off): Yes, would be great to get rid of the per ha lock. > > int pm8001_queue_command(struct sas_task *task, gfp_t gfp_flags) > { > ... > pm8001_dbg(pm8001_ha, IO, "pm8001_task_exec device\n"); > > spin_lock_irqsave(&pm8001_ha->lock, flags); > > > Thanks, > John > > > That really will affect performance... >