From: bobijam Date: Mon, 4 Aug 2008 02:57:42 +0000 (+0000) Subject: Branch HEAD X-Git-Tag: v1_9_50~82 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=5c85ea8f7efbaf448334fd682858fa23a7b800ed;ds=inline Branch HEAD b=16205 i=adilger, zhen.liang Handle TCP_BACKOFF in msec or sec. --- diff --git a/lnet/autoconf/lustre-lnet.m4 b/lnet/autoconf/lustre-lnet.m4 index 734d802..bd0e21e 100644 --- a/lnet/autoconf/lustre-lnet.m4 +++ b/lnet/autoconf/lustre-lnet.m4 @@ -127,6 +127,9 @@ else if test "$BOCD" != 0 ; then AC_DEFINE(SOCKNAL_BACKOFF, 1, [use tunable backoff TCP]) AC_MSG_RESULT(yes) + if grep rto_max $LINUX/include/linux/tcp.h|grep -q __u16; then + AC_DEFINE(SOCKNAL_BACKOFF_MS, 1, [tunable backoff TCP in ms]) + fi else AC_MSG_RESULT([no (no kernel support)]) fi diff --git a/lnet/klnds/socklnd/socklnd_lib-linux.c b/lnet/klnds/socklnd/socklnd_lib-linux.c index 821522d..0eb0997 100644 --- a/lnet/klnds/socklnd/socklnd_lib-linux.c +++ b/lnet/klnds/socklnd/socklnd_lib-linux.c @@ -790,6 +790,9 @@ ksocknal_lib_setup_sock (struct socket *sock) #ifdef SOCKNAL_BACKOFF if (*ksocknal_tunables.ksnd_backoff_init > 0) { option = *ksocknal_tunables.ksnd_backoff_init; +#ifdef SOCKNAL_BACKOFF_MS + option *= 1000; +#endif set_fs (KERNEL_DS); rc = sock->ops->setsockopt (sock, SOL_TCP, TCP_BACKOFF_INIT, @@ -804,6 +807,9 @@ ksocknal_lib_setup_sock (struct socket *sock) if (*ksocknal_tunables.ksnd_backoff_max > 0) { option = *ksocknal_tunables.ksnd_backoff_max; +#ifdef SOCKNAL_BACKOFF_MS + option *= 1000; +#endif set_fs (KERNEL_DS); rc = sock->ops->setsockopt (sock, SOL_TCP, TCP_BACKOFF_MAX,