Re: [PATCH 7/8] scsi: Add 'eh_deadline' to limit SCSI EH runtime

2014-02-27 Thread Ren Mingxin
Hi, Hannes: On 10/23/2013 04:51 PM, Hannes Reinecke wrote: This patchs adds an 'eh_deadline' sysfs attribute to the scsi host which limits the overall runtime of the SCSI EH. As you known, adding to scsi host means such interface has also been added to the SATA and USB controllers. But to user

Re: [PATCH 2/3] scsi: improved eh timeout handler

2013-10-31 Thread Ren Mingxin
Hi, Hannes: I'm sorry that I don't know why you didn't consider my former patch below which not only raises the minimum valid value of 'eh_deadline' as '0' for your former patchset but also includes some fix for your this patchset: http://www.spinics.net/lists/linux-scsi/msg69361.html If you th

Re: [PATCH 7/8] scsi: Add 'eh_deadline' to limit SCSI EH runtime

2013-10-23 Thread Ren Mingxin
Hi, Hannes: On 10/23/2013 04:51 PM, Hannes Reinecke wrote: This patchs adds an 'eh_deadline' sysfs attribute to the scsi host which limits the overall runtime of the SCSI EH. The 'eh_deadline' value is stored in the now obsolete field 'resetting'. When a command is failed the start time of the E

Re: [PATCH] scsi: Set the minimum valid value of 'eh_deadline' as 0

2013-10-10 Thread Ren Mingxin
Hi, Ewan, Hannes: On 10/09/2013 08:28 PM, Ewan Milne wrote: On Wed, 2013-10-09 at 15:43 +0800, Ren Mingxin wrote: The former minimum valid value of 'eh_deadline' is 1s, which means the earliest occasion to shorten EH is 1 second later since a command is failed or timed out. But if

[PATCH] scsi: Set the minimum valid value of 'eh_deadline' as 0

2013-10-09 Thread Ren Mingxin
(eh_deadline = 0) when commands are timed out by disabling RSCN and target port. Another thing: scsi_finish_command() should be invoked if scsi_eh_scmd_add() is returned on failure - let EH finish those commands. Signed-off-by: Ren Mingxin --- drivers/scsi/hosts.c | 14 +++--

Re: [PATCH 2/3] scsi: improved eh timeout handler

2013-09-20 Thread Ren Mingxin
Hi, Hannes: On 09/02/2013 07:58 PM, Hannes Reinecke wrote: +scmd_eh_abort_handler(struct work_struct *work) +{ + struct scsi_cmnd *scmd = + container_of(work, struct scsi_cmnd, abort_work.work); + struct scsi_device *sdev = scmd->device; + unsigned long flags; +

Re: [PATCH 7/7] scsi: Add 'eh_deadline' to limit SCSI EH runtime

2013-09-20 Thread Ren Mingxin
Hi, Hannes: On 07/01/2013 02:50 PM, Hannes Reinecke wrote: This patchs adds an 'eh_deadline' sysfs attribute to the scsi host which limits the overall runtime of the SCSI EH. The 'eh_deadline' value is stored in the now obsolete field 'resetting'. When a command is failed the start time of the E

Re: [PATCH 2/3] scsi: improved eh timeout handler

2013-09-11 Thread Ren Mingxin
Hi, Hannes: On 09/02/2013 07:58 PM, Hannes Reinecke wrote: If abort succeeds the command is either retried or terminated, depending on the number of allowed retries. However, 'eh_eflags' records the abort, so if the retry would fail again the command is pushed onto the error handler without tryi

Re: [PATCH 3/9] scsi: improved eh timeout handler

2013-08-22 Thread Ren Mingxin
Hi, Hannes: On 07/01/2013 10:24 PM, Hannes Reinecke wrote: When a command runs into a timeout we need to send an 'ABORT TASK' TMF. This is typically done by the 'eh_abort_handler' LLDD callback. Conceptually, however, this function is a normal SCSI command, so there is no need to enter the erro

Re: [PATCHv3 0/9] New EH command timeout handler

2013-08-07 Thread Ren Mingxin
Hi, Hannes: On 07/15/2013 02:05 PM, Ren Mingxin wrote: On 07/12/2013 06:27 PM, Hannes Reinecke wrote: On 07/12/2013 12:00 PM, Ren Mingxin wrote: On 07/12/2013 02:09 PM, Hannes Reinecke wrote: On 07/12/2013 06:14 AM, Ren Mingxin wrote: On 07/01/2013 10:24 PM, Hannes Reinecke wrote: With the

Re: [PATCHv2 0/7] Limit overall SCSI EH runtime

2013-08-06 Thread Ren Mingxin
Hi, James: On 07/11/2013 04:35 AM, Ewan Milne wrote: Looks good. We have been testing this extensively. Acked-by: Ewan D. Milne Do you think this patchset can be applied? If so, When? Perhaps you are waiting for someone's feedback? We've also tested and got the duration could be shortened f

Re: [PATCHv2 0/7] Limit overall SCSI EH runtime

2013-07-26 Thread Ren Mingxin
Hi, Hannes: On 07/15/2013 06:33 PM, Ren Mingxin wrote: I noticed that the dd time had been reduced from 6m+ to 2m+ when the 'eh_deadline' was set as 30s, but the dd time was 6m+(nearly the same as default - 'eh_deadline' was 0) when the 'eh_deadline' was set as

Re: [PATCHv2 0/7] Limit overall SCSI EH runtime

2013-07-15 Thread Ren Mingxin
Hi, Ewan: On 07/12/2013 09:30 PM, Ewan Milne wrote: On Fri, 2013-07-12 at 13:54 +0800, Ren Mingxin wrote: I'm wondering how do you test, with a special hardware or self-made module?Would you mind pasting your test method() and result? This was tested in a SAN environment with an EMC Symm

Re: [PATCHv3 0/9] New EH command timeout handler

2013-07-14 Thread Ren Mingxin
Hi, Hannes: On 07/12/2013 06:27 PM, Hannes Reinecke wrote: On 07/12/2013 12:00 PM, Ren Mingxin wrote: On 07/12/2013 02:09 PM, Hannes Reinecke wrote: On 07/12/2013 06:14 AM, Ren Mingxin wrote: On 07/01/2013 10:24 PM, Hannes Reinecke wrote: With the original SCSI EH I got: # time dd if=/dev

Re: [PATCHv3 0/9] New EH command timeout handler

2013-07-12 Thread Ren Mingxin
Hi, Hannes: On 07/12/2013 02:09 PM, Hannes Reinecke wrote: On 07/12/2013 06:14 AM, Ren Mingxin wrote: On 07/01/2013 10:24 PM, Hannes Reinecke wrote: With the original SCSI EH I got: # time dd if=/dev/zero of=/dev/dm-2 bs=4k count=4k oflag=direct 4096+0 records in 4096+0 records out 16777216

Re: [PATCHv2 0/7] Limit overall SCSI EH runtime

2013-07-11 Thread Ren Mingxin
Hi, Ewan: On 07/11/2013 04:35 AM, Ewan Milne wrote: On Mon, 2013-07-01 at 08:50 +0200, Hannes Reinecke wrote: This patchset implements a new 'eh_deadline' attribute to the SCSI host. It will limit the overall SCSI EH runtime by a given timeout. If the timeout is reached all intermediate EH step

Re: [PATCHv3 0/9] New EH command timeout handler

2013-07-11 Thread Ren Mingxin
Hi, Hannes: On 07/01/2013 10:24 PM, Hannes Reinecke wrote: With the original SCSI EH I got: # time dd if=/dev/zero of=/dev/dm-2 bs=4k count=4k oflag=direct 4096+0 records in 4096+0 records out 16777216 bytes (17 MB) copied, 142.652 s, 118 kB/s real2m22.657s user0m0.013s sys 0m0.145s

Re: [PATCH 0/7] Limit overall SCSI EH runtime

2013-06-27 Thread Ren Mingxin
Hi, Hannes & James: On 06/10/2013 07:11 PM, Hannes Reinecke wrote: This patchset implements a new 'eh_deadline' attribute to the SCSI host. It will limit the overall SCSI EH runtime by a given timeout. If the timeout expires all intermediate steps will be skipped and host reset will be scheduled

Re: [PATCH 0/4] New SCSI command timeout handler

2013-06-07 Thread Ren Mingxin
Hi, Hannes: On 06/06/2013 05:43 PM, Hannes Reinecke wrote: this is the first step towards a new non-blocking error handler. This patch implements a new command timeout handler which will be sending command aborts inline without engaging SCSI EH. In addition the commands will be returned directl

Re: [PATCH 3/4] scsi: improved eh timeout handler

2013-06-06 Thread Ren Mingxin
Hi, Hannes: On 06/07/2013 04:28 AM, Jörn Engel wrote: On Thu, 6 June 2013 22:39:14 +0200, Hannes Reinecke wrote: + spin_unlock_irqrestore(&sdev->list_lock, flags); + SCSI_LOG_ERROR_RECOVERY(3, + scmd_printk(KERN_INFO, scmd, +

Re: [PATCH 3/3] scsi: Return ENODATA on medium error

2013-06-06 Thread Ren Mingxin
Hi, Hannes: On 06/05/2013 03:11 PM, Hannes Reinecke wrote: When a medium error is detected the SCSI stack should return ENODATA to the upper layers. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_error.c | 7 ++- drivers/scsi/scsi_lib.c | 5 + include/scsi/scsi.h | 2 +

Re: [PATCH 1/3] scsi: Document enhanced error codes

2013-06-05 Thread Ren Mingxin
Hi, Hannes: I have two questions about the comments: On 06/05/2013 03:10 PM, Hannes Reinecke wrote: Document the various error codes returned on I/O failure. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_error.c | 7 +-- drivers/scsi/scsi_lib.c | 11 +++ 2 files chang

Re: [PATCH 0/4] New FC timeout handler

2013-05-30 Thread Ren Mingxin
Hi, Hannes: On 05/24/2013 05:50 PM, Hannes Reinecke wrote: this is the first step towards a new FC error handler. This patch implements a new FC command timeout handler which will be sending command aborts inline without engaging SCSI EH. In addition the commands will be returned directly if th

Re: [PATCH 0/5] scsi: Allow fast io fail without waiting through timeout

2013-05-22 Thread Ren Mingxin
your general goal/idea briefly even though via a reference? Will the URL below be one you will refer to? http://lwn.net/Articles/548500 And, could I know your current progress/schedule? Especially when can we see your patches? Much appreciated! Thanks, Ren On 5/20/2013 3:14 AM, Ren Mingxin

[PATCH 0/5] scsi: Allow fast io fail without waiting through timeout

2013-05-20 Thread Ren Mingxin
redundant system, we should avoid the scsi eh for its long time failing recovery, and quick failover to another path. This set of patches is trying to implement above. NOTE: the userland tools need to eusure the environment restriction, which will be implemented later. Thanks, Ren Ren Mingxin (5

[PATCH 3/5] SAS transport: Add interface to specify fast io level for timed-out cmds

2013-05-20 Thread Ren Mingxin
mainly for redundant environments. To redundant systems, they need a quick give up and failover, instead of thorough recovery which usually takes much time. The actions in LLDD/redundant configurations should be implemented individually later. Signed-off-by: Ren Mingxin --- drivers/scsi/scsi_sas_

[PATCH 1/5] scsi: rename return code FAST_IO_FAIL to FAST_IO

2013-05-20 Thread Ren Mingxin
The return code FAST_IO_FAIL was introduced for fast failed io recovery. To use this code for fast timed-out io recovery as well, we'd rename it to FAST_IO. Signed-off-by: Ren Mingxin --- drivers/scsi/scsi_error.c | 18 +- drivers/scsi/scsi_transport_fc.c|

[PATCH 5/5] mptfusion: Allow fast timed-out io recovery

2013-05-20 Thread Ren Mingxin
specified device and any I/Os are not passed to LLDD. Reference: http://www.spinics.net/lists/linux-scsi/msg35091.html So with this patch, we just spend time writing(about 69s) and waiting through timeout(60s), and save about 59s in scsi eh. Signed-off-by: Ren Mingxin --- drivers

[PATCH 2/5] FC transport: Add interface to specify fast io level for timed-out cmds

2013-05-20 Thread Ren Mingxin
mainly for redundant environments. To redundant systems, they need a quick give up and failover, instead of thorough recovery which usually takes much time. The actions in LLDD/redundant configurations should be implemented individually later. Signed-off-by: Ren Mingxin --- drivers/scsi/scsi_transport_f

[PATCH 4/5] lpfc: Allow fast timed-out io recovery

2013-05-20 Thread Ren Mingxin
3s) and waiting through timeout(30s), and save about 71s in scsi eh. Signed-off-by: Ren Mingxin --- drivers/scsi/lpfc/lpfc_scsi.c | 34 -- 1 files changed, 32 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c

[PATCH] scsi_dh: remove unused declaration dm_pg_init_complete()

2013-04-16 Thread Ren Mingxin
This patch removes dm_pg_init_complete()'s declaration as it is not needed anymore since 2651f5d7d3bc5120a439e498f131e4d731f99b3e. Signed-off-by: Ren Mingxin --- drivers/md/dm-mpath.h |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/drivers/md/dm-mpath.h b/drive

Re: error handler scheduling

2013-04-12 Thread Ren Mingxin
On 03/29/2013 12:02 AM, Elliott, Robert (Server Storage) wrote: There are several possible reasons for SCSI command timeouts: a) the command request did not get to the SCSI target port and logical unit (e.g., error on the wire) b) logical unit is still working on the command

[PATCH] scsi/lpfc: add return code FAST_IO_FAIL in lpfc_abort_handler() comments

2013-03-26 Thread Ren Mingxin
Signed-off-by: Ren Mingxin --- drivers/scsi/lpfc/lpfc_scsi.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 98af07c..cc6fc83 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc

scsi_error: improve the recovery latency for timeouted scsi cmds

2013-03-19 Thread Ren Mingxin
Hi, Please let me ask one question about improving the recovery latency for timeouted scmds: In the functions 'scsi_eh_wakeup()' & 'scsi_error_handler()', there are two same condition judgements which ensure the number of active scmds equals to the number of failed scmds: void scsi_eh_wakeup(

Re: [PATCH] lpfc: init: fix misspelling word in mailbox command waiting comments

2012-12-10 Thread Ren Mingxin
On 12/11/2012 11:53 AM, re...@cn.fujitsu.com wrote: From: Ren Mingxin Superfluous, sorry for disturbing everyone :-( Ren -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo inf

[PATCH] lpfc: init: fix misspelling word in mailbox command waiting comments

2012-12-10 Thread Ren Mingxin
Correct misspelling of "outstanding" in mailbox command waiting comments. Signed-off-by: Ren Mingxin Signed-off-by: Pan Dayu --- drivers/scsi/lpfc/lpfc_init.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/l