Skip to content

Commit 548ebb3

Browse files
johnpgarrymartinkpetersen
authored andcommitted
scsi: scsi_debug: Add poll mode deferred completions to statistics
Currently commands completed via poll mode are not included in the statistics gathering for deferred completions and missed CPUs. Poll mode completions should be treated the same as other deferred completion types, so add poll mode completions to the statistics. Signed-off-by: John Garry <john.g.garry@oracle.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Link: https://lore.kernel.org/r/20230313093114.1498305-12-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent f037b5c commit 548ebb3

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/scsi/scsi_debug.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7531,6 +7531,13 @@ static int sdebug_blk_mq_poll(struct Scsi_Host *shost, unsigned int queue_num)
75317531
}
75327532
WRITE_ONCE(sd_dp->defer_t, SDEB_DEFER_NONE);
75337533
spin_unlock_irqrestore(&sqp->qc_lock, iflags);
7534+
7535+
if (sdebug_statistics) {
7536+
atomic_inc(&sdebug_completions);
7537+
if (raw_smp_processor_id() != sd_dp->issuing_cpu)
7538+
atomic_inc(&sdebug_miss_cpus);
7539+
}
7540+
75347541
scsi_done(scp); /* callback to mid level */
75357542
num_entries++;
75367543
spin_lock_irqsave(&sqp->qc_lock, iflags);

0 commit comments

Comments
 (0)