[Devel] Patch added to scsi: scsi: core: Ensure that the SCSI error handler gets woken up

Konstantin Khorenko khorenko at virtuozzo.com
Thu Jan 11 18:36:55 MSK 2018


Just for the history: we use another version of this patch from Pasha:

commit b3200410cbbe897c00d4e0a0a81c57987b567beb
Author: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Date:   Wed Sep 6 19:14:50 2017 +0300

     scsi/eh: fix hang adding ehandler wakeups after decrementing host_busy


It's simpler and we don't see performance decrease => let's leave it as is.

--
Best regards,

Konstantin Khorenko,
Virtuozzo Linux Kernel Team

On 12/12/2017 07:22 PM, James Bottomley wrote:
> Your commit:
>
>     scsi: core: Ensure that the SCSI error handler gets woken up
>
>     If scsi_eh_scmd_add() is called concurrently with
>     scsi_host_queue_ready() while shost->host_blocked > 0 then it can
>     happen that neither function wakes up the SCSI error handler. Fix
>     this by making every function that decreases the host_busy counter
>     wake up the error handler if necessary and by protecting the
>     host_failed checks with the SCSI host lock.
>
>     Reported-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
>     References: https://marc.info/?l=linux-kernel&m=150461610630736
>     Fixes: commit 746650160866 ("scsi: convert host_busy to atomic_t")
>     Signed-off-by: Bart Van Assche <bart.vanassche at wdc.com>
>     Reviewed-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
>     Tested-by: Stuart Hayes <stuart.w.hayes at gmail.com>
>     Cc: Konstantin Khorenko <khorenko at virtuozzo.com>
>     Cc: Stuart Hayes <stuart.w.hayes at gmail.com>
>     Cc: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
>     Cc: Christoph Hellwig <hch at lst.de>
>     Cc: Hannes Reinecke <hare at suse.com>
>     Cc: Johannes Thumshirn <jthumshirn at suse.de>
>     Cc: <stable at vger.kernel.org>
>     Signed-off-by: Martin K. Petersen <martin.petersen at oracle.com>
>
> has been added to the upstream scsi tree
> On branch "misc"
> You can find it here:
>
> http://git.kernel.org/?p=linux/kernel/git/jejb/scsi.git;a=commit;h=3bd6f43f5cb3714f70c591514f344389df593501
>
> This patch is scheduled to be pushed when the merge window opens for 4.16
>
> James Bottomley
>
> P.S. If you find this email unwanted, set up a procmail rule junking on
> the header:
>
> X-Git-Tree: SCSI
> .
>


More information about the Devel mailing list