All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: qla2xxx: reduce the time granularity of qla2x00_eh_wait_on_command
@ 2018-04-10  8:48 Jianchao Wang
  2018-04-12  9:00 ` jianchao.wang
  0 siblings, 1 reply; 2+ messages in thread
From: Jianchao Wang @ 2018-04-10  8:48 UTC (permalink / raw)
  To: qla2xxx-upstream, jejb, martin.petersen; +Cc: linux-scsi, linux-kernel

If the cmd has not be returned after aborted by qla2x00_eh_abort,
we have to wait for it. However, the time is 1000ms at least currently.
If there are a lot cmds need to be aborted, the delay could be long
enough to lead to panic due to such as hung task, ocfs2 heartbeat,
etc, just before scsi recovery works.
Change the granularity to 1ms, even though more context switches
would be introduced, but it should be ok as it is not hot path.

Signed-off-by: Jianchao Wang <jianchao.w.wang@oracle.com>
---
 drivers/scsi/qla2xxx/qla_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 5c5dcca4..9f52ad9 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1072,7 +1072,7 @@ qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd,
 static int
 qla2x00_eh_wait_on_command(struct scsi_cmnd *cmd)
 {
-#define ABORT_POLLING_PERIOD	1000
+#define ABORT_POLLING_PERIOD	1
 #define ABORT_WAIT_ITER		((2 * 1000) / (ABORT_POLLING_PERIOD))
 	unsigned long wait_iter = ABORT_WAIT_ITER;
 	scsi_qla_host_t *vha = shost_priv(cmd->device->host);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi: qla2xxx: reduce the time granularity of qla2x00_eh_wait_on_command
  2018-04-10  8:48 [PATCH] scsi: qla2xxx: reduce the time granularity of qla2x00_eh_wait_on_command Jianchao Wang
@ 2018-04-12  9:00 ` jianchao.wang
  0 siblings, 0 replies; 2+ messages in thread
From: jianchao.wang @ 2018-04-12  9:00 UTC (permalink / raw)
  To: qla2xxx-upstream, jejb, martin.petersen; +Cc: linux-scsi, linux-kernel

Would anyone please take a review on this ?

Thanks in advance
Jianchao

On 04/10/2018 04:48 PM, Jianchao Wang wrote:
> If the cmd has not be returned after aborted by qla2x00_eh_abort,
> we have to wait for it. However, the time is 1000ms at least currently.
> If there are a lot cmds need to be aborted, the delay could be long
> enough to lead to panic due to such as hung task, ocfs2 heartbeat,
> etc, just before scsi recovery works.
> Change the granularity to 1ms, even though more context switches
> would be introduced, but it should be ok as it is not hot path.
> 
> Signed-off-by: Jianchao Wang <jianchao.w.wang@oracle.com>
> ---
>  drivers/scsi/qla2xxx/qla_os.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
> index 5c5dcca4..9f52ad9 100644
> --- a/drivers/scsi/qla2xxx/qla_os.c
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -1072,7 +1072,7 @@ qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd,
>  static int
>  qla2x00_eh_wait_on_command(struct scsi_cmnd *cmd)
>  {
> -#define ABORT_POLLING_PERIOD	1000
> +#define ABORT_POLLING_PERIOD	1
>  #define ABORT_WAIT_ITER		((2 * 1000) / (ABORT_POLLING_PERIOD))
>  	unsigned long wait_iter = ABORT_WAIT_ITER;
>  	scsi_qla_host_t *vha = shost_priv(cmd->device->host);
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-12  9:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-10  8:48 [PATCH] scsi: qla2xxx: reduce the time granularity of qla2x00_eh_wait_on_command Jianchao Wang
2018-04-12  9:00 ` jianchao.wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.