Re: [PATCH v4 4/5] scsi_debug: add new defer type for mq poll

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/15/21 8:40 AM, Kashyap Desai wrote:
From: Douglas Gilbert <dgilbert@xxxxxxxxxxxx>

Add a new sdeb_defer_type enumeration: SDEB_DEFER_POLL for requests
that have REQ_HIPRI set in cmd_flags field. It is expected that
these requests will be polled via the mq_poll entry point which
is driven by calls to blk_poll() in the block layer. Therefore
timer events are not 'wired up' in the normal fashion.

There are still cases with short delays (e.g. < 10 microseconds)
where by the time the command response processing occurs, the delay
is already exceeded in which case the code calls scsi_done()
directly. In such cases there is no window for mq_poll() to be
called.

Add 'mq_polls' counter that increments on each scsi_done() called
via the mq_poll entry point. Can be used to show (with 'cat
/proc/scsi/scsi_debug/<host_id>') that blk_poll() is causing
completions rather than some other mechanism.

This patch is improvement over previous patch
"scsi_debug: iouring iopoll support"

Changes since version 3
   - Fix IO hang issue. Do not return from schedule_resp. Use new defer
     type for mq poll to queue the REQ_HIPRI IOs.

Changes since version 2 [sent 20210206 to linux-scsi list]
   - the sdebug_blk_mq_poll() callback didn't cope with the
     uncommon case where sqcp->sd_dp is NULL. Fix.

Changes since version 1 [sent 20210201 to linux-scsi list]
   - harden SDEB_DEFER_POLL which broke under testing
   - add mq_polls counter for debug output

Signed-off-by: Douglas Gilbert <dgilbert@xxxxxxxxxxxx>
Tested-by: Kashyap Desai <kashyap.desai@xxxxxxxxxxxx>

Reviewed-by: Hannes Reinecke <hare@xxxxxxx>

Cheers,

Hannes
--
Dr. Hannes Reinecke                Kernel Storage Architect
hare@xxxxxxx                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux