This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Cluster Project branch, RHEL46, updated. cman-kernel_2_6_9_54-7-g16b6a74


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=16b6a74c24d437cacd136d3376cae61eb45a4e38

The branch, RHEL46 has been updated
       via  16b6a74c24d437cacd136d3376cae61eb45a4e38 (commit)
      from  0413a207c89b6b4d440b4f8bc27545ec4ee76528 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 16b6a74c24d437cacd136d3376cae61eb45a4e38
Author: Christine Caulfield <ccaulfie@redhat.com>
Date:   Tue Apr 15 16:34:48 2008 +0100

    [DLM] Add tcp_nodelay option to DLM comms
    
    Under some very odd loads, the TCP nagle algorithm can cause
    annoying delays in lock traffic. This option allows it to
    be switched off with
    
      echo "1" > /proc/cluster/config/dlm/tcp_nodelay
    
    This should NOT be a default, in most cases it will cause
    a huge performance drop. It is global to all DLM communications
    and cannot be changed per lockspace.
    
    It is included specifically for bz#244708.
    
    4.6.z bz#442573
    
    Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>

-----------------------------------------------------------------------

Summary of changes:
 dlm-kernel/src/config.c   |    6 ++++++
 dlm-kernel/src/config.h   |    1 +
 dlm-kernel/src/lowcomms.c |   14 ++++++++++++++
 3 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/dlm-kernel/src/config.c b/dlm-kernel/src/config.c
index 41bdedd..b90d256 100644
--- a/dlm-kernel/src/config.c
+++ b/dlm-kernel/src/config.c
@@ -20,6 +20,7 @@
 
 /* Config file defaults */
 #define DEFAULT_TCP_PORT       21064
+#define DEFAULT_TCP_NODELAY        0
 #define DEFAULT_LOCK_TIMEOUT      30
 #define DEFAULT_BUFFER_SIZE     4096
 #define DEFAULT_RSBTBL_SIZE      256
@@ -31,6 +32,7 @@
 
 struct config_info dlm_config = {
 	.tcp_port = DEFAULT_TCP_PORT,
+	.tcp_nodelay = DEFAULT_TCP_NODELAY,
 	.lock_timeout = DEFAULT_LOCK_TIMEOUT,
 	.buffer_size = DEFAULT_BUFFER_SIZE,
 	.rsbtbl_size = DEFAULT_RSBTBL_SIZE,
@@ -51,6 +53,10 @@ static struct config_proc_info {
 	.value = &dlm_config.tcp_port,
     },
     {
+	.name = "tcp_nodelay",
+	.value = &dlm_config.tcp_nodelay,
+    },
+    {
 	.name = "lock_timeout",
 	.value = &dlm_config.lock_timeout,
     },
diff --git a/dlm-kernel/src/config.h b/dlm-kernel/src/config.h
index 9190c6b..0b37cf4 100644
--- a/dlm-kernel/src/config.h
+++ b/dlm-kernel/src/config.h
@@ -16,6 +16,7 @@
 
 struct config_info {
 	int tcp_port;
+	int tcp_nodelay;
 	int lock_timeout;
 	int buffer_size;
 	int rsbtbl_size;
diff --git a/dlm-kernel/src/lowcomms.c b/dlm-kernel/src/lowcomms.c
index 4967092..8ea83dd 100644
--- a/dlm-kernel/src/lowcomms.c
+++ b/dlm-kernel/src/lowcomms.c
@@ -598,6 +598,16 @@ static int connect_to_sock(struct connection *con)
 	/* Set up for connect */
 	make_sockaddr(&saddr, dlm_config.tcp_port, &addr_len);
 
+	if (dlm_config.tcp_nodelay) {
+		int one = 1;
+		mm_segment_t fs;
+
+		fs = get_fs();
+		set_fs(get_ds());
+
+		tcp_setsockopt(sock->sk, SOL_TCP, TCP_NODELAY, (char *)&one, sizeof(one));
+		set_fs(fs);
+	}
 	add_sock(sock, con);
 
 	log_debug2("connecting to %d", con->nodeid);
@@ -653,6 +663,10 @@ static struct socket *create_listen_sock(struct connection *con, char *addr, int
 
 	fs = get_fs();
 	set_fs(get_ds());
+
+	if (dlm_config.tcp_nodelay)
+		result = tcp_setsockopt(sock->sk, SOL_TCP, TCP_NODELAY, (char *)&one, sizeof(one));
+
 	result = sock_setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *)&one, sizeof(one));
 	set_fs(fs);
 	if (result < 0) {


hooks/post-receive
--
Cluster Project


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]