Skip to content

Commit a45f937

Browse files
Can Guomartinkpetersen
authored andcommitted
scsi: ufs: Optimize host lock on transfer requests send/compl paths
Current UFS IRQ handler is completely wrapped by host lock, and because ufshcd_send_command() is also protected by host lock, when IRQ handler fires, not only the CPU running the IRQ handler cannot send new requests, the rest CPUs can neither. Move the host lock wrapping the IRQ handler into specific branches, i.e., ufshcd_uic_cmd_compl(), ufshcd_check_errors(), ufshcd_tmc_handler() and ufshcd_transfer_req_compl(). Meanwhile, to further reduce occpuation of host lock in ufshcd_transfer_req_compl(), host lock is no longer required to call __ufshcd_transfer_req_compl(). As per test, the optimization can bring considerable gain to random read/write performance. Link: https://lore.kernel.org/r/[email protected] Cc: Stanley Chu <[email protected]> Reported-by: kernel test robot <[email protected]> Reviewed-by: Bean Huo <[email protected]> Reviewed-by: Stanley Chu <[email protected]> Co-developed-by: Asutosh Das <[email protected]> Signed-off-by: Asutosh Das <[email protected]> Signed-off-by: Can Guo <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 1cca0c3 commit a45f937

File tree

2 files changed

+126
-134
lines changed

2 files changed

+126
-134
lines changed

0 commit comments

Comments
 (0)