• Xiang Chen's avatar
    scsi: hisi_sas: relocate smp sg map · 7eee4b92
    Xiang Chen authored
    Currently we use DQ lock to protect delivery of DQ entry one by one.
    
    To optimise to allow more than one slot to be built for a single DQ in
    parallel, we need to remove the DQ lock when preparing slots, prior to
    delivery.
    
    To achieve this, we rearrange the slot build order to ensure that once
    we allocate a slot for a task, we do cannot fail to deliver the task.
    
    In this patch, we rearrange the slot building for SMP tasks to ensure
    that sg mapping part (which can fail) happens before we allocate the
    slot in the DQ.
    Signed-off-by: default avatarXiang Chen <chenxiang66@hisilicon.com>
    Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    7eee4b92
hisi_sas_main.c 59.9 KB