2006-08-18 18:56:39

by Ed L. Cashin

[permalink] [raw]
Subject: [PATCH 2.6.18-rc4] aoe [10/13]: module parameter for device timeout

Signed-off-by: "Ed L. Cashin" <[email protected]>

The aoe_deadsecs module parameter sets the number of seconds that
elapse before a nonresponsive AoE device is marked as dead.

diff -upr 2.6.18-rc4-orig/drivers/block/aoe/aoecmd.c 2.6.18-rc4-aoe/drivers/block/aoe/aoecmd.c
--- 2.6.18-rc4-orig/drivers/block/aoe/aoecmd.c 2006-08-17 16:45:34.000000000 -0400
+++ 2.6.18-rc4-aoe/drivers/block/aoe/aoecmd.c 2006-08-17 16:45:34.000000000 -0400
@@ -15,7 +15,10 @@
#define TIMERTICK (HZ / 10)
#define MINTIMER (2 * TIMERTICK)
#define MAXTIMER (HZ << 1)
-#define MAXWAIT (60 * 3) /* After MAXWAIT seconds, give up and fail dev */
+
+static int aoe_deadsecs = 60 * 3;
+module_param(aoe_deadsecs, int, 0644);
+MODULE_PARM_DESC(aoe_deadsecs, "After aoe_deadsecs seconds, give up and fail dev.");

struct sk_buff *
new_skb(ulong len)
@@ -373,7 +376,7 @@ rexmit_timer(ulong vp)
if (f->tag != FREETAG && tsince(f->tag) >= timeout) {
n = f->waited += timeout;
n /= HZ;
- if (n > MAXWAIT) { /* waited too long. device failure. */
+ if (n > aoe_deadsecs) { /* waited too long for response */
aoedev_downdev(d);
break;
}


--
"Ed L. Cashin" <[email protected]>


2006-08-18 22:42:11

by Alan

[permalink] [raw]
Subject: Re: [PATCH 2.6.18-rc4] aoe [10/13]: module parameter for device timeout

Ar Gwe, 2006-08-18 am 13:39 -0400, ysgrifennodd Ed L. Cashin:
> Signed-off-by: "Ed L. Cashin" <[email protected]>
>
> The aoe_deadsecs module parameter sets the number of seconds that
> elapse before a nonresponsive AoE device is marked as dead.
>

Isn't this a) per link dependant and b) needing to be runtime tuned
(sysfs say ?)

2006-08-18 23:40:48

by Ed L. Cashin

[permalink] [raw]
Subject: Re: [PATCH 2.6.18-rc4] aoe [10/13]: module parameter for device timeout

On Sat, Aug 19, 2006 at 12:03:07AM +0100, Alan Cox wrote:
> Ar Gwe, 2006-08-18 am 13:39 -0400, ysgrifennodd Ed L. Cashin:
> > Signed-off-by: "Ed L. Cashin" <[email protected]>
> >
> > The aoe_deadsecs module parameter sets the number of seconds that
> > elapse before a nonresponsive AoE device is marked as dead.
> >
>
> Isn't this a) per link dependant and b) needing to be runtime tuned
> (sysfs say ?)

No, this is just for users who need very fast failure. The default
three minutes is good for things like short network interruptions and
even quick AoE device reboots, but users who aren't interested in that
kind of flexibility and want a fast failure generally want it always
and on every link.

--
Ed L Cashin <[email protected]>

2006-08-19 09:28:10

by Alan

[permalink] [raw]
Subject: Re: [PATCH 2.6.18-rc4] aoe [10/13]: module parameter for device timeout

Ar Gwe, 2006-08-18 am 19:10 -0400, ysgrifennodd Ed L. Cashin:
> No, this is just for users who need very fast failure. The default
> three minutes is good for things like short network interruptions and
> even quick AoE device reboots, but users who aren't interested in that
> kind of flexibility and want a fast failure generally want it always
> and on every link.

Ok, but it should still be runtime settable.

2006-08-22 00:07:20

by Ed L. Cashin

[permalink] [raw]
Subject: Re: [PATCH 2.6.18-rc4] aoe [10/13]: module parameter for device timeout

On Sat, Aug 19, 2006 at 01:09:11AM +0100, Alan Cox wrote:
> Ar Gwe, 2006-08-18 am 19:10 -0400, ysgrifennodd Ed L. Cashin:
> > No, this is just for users who need very fast failure. The default
> > three minutes is good for things like short network interruptions and
> > even quick AoE device reboots, but users who aren't interested in that
> > kind of flexibility and want a fast failure generally want it always
> > and on every link.
>
> Ok, but it should still be runtime settable.

You know, it occurs to me that it is, just by virtue of sysfs, and a
little test shows that to be the case.

--
Ed L Cashin <[email protected]>