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

2013-10-23 Thread Hannes Reinecke
On 10/23/2013 09:46 AM, James Bottomley wrote: On Wed, 2013-10-23 at 11:25 +0200, Hannes Reinecke wrote: On 10/16/2013 09:22 PM, James Bottomley wrote: On Mon, 2013-07-01 at 08:50 +0200, Hannes Reinecke wrote: This patchs adds an 'eh_deadline' sysfs attribute to the scsi host which limits the

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

2013-10-23 Thread James Bottomley
On Wed, 2013-10-23 at 11:25 +0200, Hannes Reinecke wrote: > On 10/16/2013 09:22 PM, James Bottomley wrote: > > On Mon, 2013-07-01 at 08:50 +0200, Hannes Reinecke wrote: > >> This patchs adds an 'eh_deadline' sysfs attribute to the scsi > >> host which limits the overall runtime of the SCSI EH. > >>

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

2013-10-23 Thread Hannes Reinecke
On 10/16/2013 09:22 PM, James Bottomley wrote: On Mon, 2013-07-01 at 08:50 +0200, 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'. Wh

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

2013-10-17 Thread Ewan Milne
On Wed, 2013-10-16 at 19:22 +, James Bottomley wrote: > What about instead: > > static int scsi_host_eh_past_deadline(struct Scsi_Host *shost, int percent) { > if (!shost->last_reset || !shost->eh_deadline) > return 0; > > if (time_before(jiffies, >

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

2013-10-16 Thread James Bottomley
On Mon, 2013-07-01 at 08:50 +0200, 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

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

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

2013-06-30 Thread Hannes Reinecke
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 EH is stored in 'last_reset'. If the overall runtime of the SCS

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

2013-06-28 Thread Ewan Milne
On Fri, 2013-06-28 at 09:14 +0200, Hannes Reinecke wrote: > >> @@ -232,6 +272,9 @@ int scsi_eh_scmd_add(struct scsi_cmnd *scmd, int > >> eh_flag) > >>if (scsi_host_set_state(shost, SHOST_CANCEL_RECOVERY)) > >>goto out_unlock; > >> > >> + if (sdev->eh_deadline &&

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

2013-06-28 Thread Hannes Reinecke
On 06/28/2013 09:29 AM, Bart Van Assche wrote: > On 06/10/13 13:11, Hannes Reinecke wrote: >> +static int sdev_eh_deadline(struct Scsi_Host *shost, >> + unsigned long eh_start) >> +{ >> +if (!shost->eh_deadline) >> +return 0; >> + >> +if (shost->last_reset != 0 && >> +

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

2013-06-28 Thread Bart Van Assche
On 06/10/13 13:11, Hannes Reinecke wrote: +static int sdev_eh_deadline(struct Scsi_Host *shost, + unsigned long eh_start) +{ + if (!shost->eh_deadline) + return 0; + + if (shost->last_reset != 0 && + time_before(shost->last_reset, eh_st

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

2013-06-28 Thread Hannes Reinecke
On 06/27/2013 04:33 PM, Ewan Milne wrote: > The eh_deadline changes allow for a significant improvement > in multipath failover time. It works very well in our testing. > I do have a few corrections, see below: > > On Mon, 2013-06-10 at 13:11 +0200, Hannes Reinecke wrote: >> This patchs adds an '

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

2013-06-27 Thread Ewan Milne
The eh_deadline changes allow for a significant improvement in multipath failover time. It works very well in our testing. I do have a few corrections, see below: On Mon, 2013-06-10 at 13:11 +0200, Hannes Reinecke wrote: > This patchs adds an 'eh_deadline' attribute to the scsi > host which limit

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

2013-06-10 Thread Hannes Reinecke
This patchs adds an 'eh_deadline' attribute to the scsi host which limits the overall runtime of the SCSI EH. When a command is failed the start time of the EH is stored in 'last_reset'. If the overall runtime of the SCSI EH is longer than last_reset + eh_deadline, the EH is short-circuited and fal