mirror of
https://github.com/torvalds/linux.git
synced 2024-12-18 00:53:40 +00:00
scsi: mpt3sas: Call cpu_relax() before calling udelay()
Call cpu_relax() while waiting for the current blk-mq polling instance to complete. Link: https://lore.kernel.org/r/20210901152542.27866-1-sreekanth.reddy@broadcom.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
4e28550829
commit
e4953a9310
@ -1582,8 +1582,10 @@ mpt3sas_base_pause_mq_polling(struct MPT3SAS_ADAPTER *ioc)
|
||||
* wait for current poll to complete.
|
||||
*/
|
||||
for (qid = 0; qid < iopoll_q_count; qid++) {
|
||||
while (atomic_read(&ioc->io_uring_poll_queues[qid].busy))
|
||||
while (atomic_read(&ioc->io_uring_poll_queues[qid].busy)) {
|
||||
cpu_relax();
|
||||
udelay(500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user