Re: [PATCH] SCSI: don't hold device refcount in IO path

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

 



On Tue, 2019-04-02 at 19:48 +-0800, Ming Lei wrote:
+AD4 scsi+AF8-device's refcount is always grabed in IO path.
                                   +AF4AXgBeAF4AXgBe
                                   grabbed?

+AD4 Turns out it isn't necessary, becasue blk+AF8-queue+AF8-cleanup() will
+AD4 drain any in-flight IOs, then cancel timeout/requeue work, and
+AD4 SCSI's requeue+AF8-work is canceled too in +AF8AXw-scsi+AF8-remove+AF8-device().
+AD4 
+AD4 Also scsi+AF8-device won't go away until blk+AF8-cleanup+AF8-queue() is done.
+AD4 
+AD4 So don't hold the refcount in IO path.

Holding the device reference count was definitely necessary in the past.
You may want to reflect this in the patch description by mentioning that
grabbing that reference count is no longer required today because the
draining mechanism now waits for requeuing to occur. I don't think that
was the case for the legacy block layer.

Bart.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux