Commit e4953a93 authored by Sreekanth Reddy's avatar Sreekanth Reddy Committed by Martin K. Petersen
Browse files

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: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarSreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 4e285508
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1582,10 +1582,12 @@ 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);
		}
	}
}

/**
 * mpt3sas_base_resume_mq_polling - Resume polling on mq poll queues.