mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Christie <michael.christie@oracle.com>
To: Wenchao Hao <haowenchao@huawei.com>,
	"James E . J . Bottomley" <jejb@linux.ibm.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	Hannes Reinecke <hare@suse.de>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: linfeilong@huawei.com
Subject: Re: [PATCH] scsi: core: always finish successfully aborted notry command
Date: Sun, 3 Apr 2022 11:58:59 -0500	[thread overview]
Message-ID: <775f75db-edb8-8f39-2592-862756811710@oracle.com> (raw)
In-Reply-To: <20220401035020.1043239-1-haowenchao@huawei.com>

On 3/31/22 10:50 PM, Wenchao Hao wrote:
> If the abort command succeed and it does not need to be retired, do not add
> it to error handle list. 
> 
> Adding command to error handle list is an annoying flow which would stop I/O
> of all LUNs which shared a same HBA.
> 
> So here if we successfully abort a command, we can finish it via
> scsi_finish_command() which would reduce time spent on scsi_error_handler()
> 
> Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
> ---
>  drivers/scsi/scsi_error.c | 55 +++++++++++++++++++++------------------
>  1 file changed, 29 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
> index cdaca13ac1f1..15299603b7ee 100644
> --- a/drivers/scsi/scsi_error.c
> +++ b/drivers/scsi/scsi_error.c
> @@ -173,41 +173,44 @@ scmd_eh_abort_handler(struct work_struct *work)
>  		goto out;
>  	}
>  	set_host_byte(scmd, DID_TIME_OUT);
> -	if (scsi_host_eh_past_deadline(shost)) {
> -		SCSI_LOG_ERROR_RECOVERY(3,
> -			scmd_printk(KERN_INFO, scmd,
> -				    "eh timeout, not retrying "
> -				    "aborted command\n"));
> -		goto out;
> -	}
>  
> -	spin_lock_irqsave(shost->host_lock, flags);
> -	list_del_init(&scmd->eh_entry);
> +	if (scsi_noretry_cmd(scmd) ||
> +	    !scsi_cmd_retry_allowed(scmd) &&
> +	    !scsi_eh_should_retry_cmd(scmd)) {


I don't think this test is correct. Did you want all ||s?

For what the patch is trying to accomplish I'm not sure if it's
the behavior people wanted. Do all drivers have configurable
abort timeouts? If an abort takes N minutes to complete ok,
and that's put us over the eh deadline maybe the user wanted
that device to be offlined.

  reply	other threads:[~2022-04-03 16:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-01  3:50 Wenchao Hao
2022-04-03 16:58 ` Mike Christie [this message]
2022-04-06  6:56   ` Wenchao Hao
2022-04-06 16:08     ` Mike Christie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=775f75db-edb8-8f39-2592-862756811710@oracle.com \
    --to=michael.christie@oracle.com \
    --cc=haowenchao@huawei.com \
    --cc=hare@suse.de \
    --cc=jejb@linux.ibm.com \
    --cc=linfeilong@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®