Skip to content

Commit 24d7071

Browse files
thenzlmartinkpetersen
authored andcommitted
scsi: mpi3mr: A performance fix
Commit 0c52310 ("hrtimer: Ignore slack time for RT tasks in schedule_hrtimeout_range()") effectivelly shortens a sleep in a polling function in the driver. That is causing a performance regression as the new value of just 2us is too low, in certain tests the perf drop is ~30%. Fix this by adjusting the sleep to 20us (close to the previous value). Reported-by: Jan Jurca <[email protected]> Signed-off-by: Tomas Henzl <[email protected]> Acked-by: Sumit Saxena <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 0c40f07 commit 24d7071

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/scsi/mpi3mr/mpi3mr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ extern atomic64_t event_counter;
178178
#define MPI3MR_DEFAULT_SDEV_QD 32
179179

180180
/* Definitions for Threaded IRQ poll*/
181-
#define MPI3MR_IRQ_POLL_SLEEP 2
181+
#define MPI3MR_IRQ_POLL_SLEEP 20
182182
#define MPI3MR_IRQ_POLL_TRIGGER_IOCOUNT 8
183183

184184
/* Definitions for the controller security status*/

drivers/scsi/mpi3mr/mpi3mr_fw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ static irqreturn_t mpi3mr_isr_poll(int irq, void *privdata)
728728
mpi3mr_process_op_reply_q(mrioc,
729729
intr_info->op_reply_q);
730730

731-
usleep_range(MPI3MR_IRQ_POLL_SLEEP, 10 * MPI3MR_IRQ_POLL_SLEEP);
731+
usleep_range(MPI3MR_IRQ_POLL_SLEEP, MPI3MR_IRQ_POLL_SLEEP + 1);
732732

733733
} while (atomic_read(&intr_info->op_reply_q->pend_ios) &&
734734
(num_op_reply < mrioc->max_host_ios));

0 commit comments

Comments
 (0)