public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: ccaulfield@sourceware.org To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com Subject: Cluster Project branch, RHEL4, updated. gfs-kernel_2_6_9_76-43-g8dc51a6 Date: Tue, 15 Apr 2008 15:35:00 -0000 [thread overview] Message-ID: <20080415153525.6491.qmail@sourceware.org> (raw) 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=8dc51a64cf9a0bc1b467353a4161220a7cec0de0 The branch, RHEL4 has been updated via 8dc51a64cf9a0bc1b467353a4161220a7cec0de0 (commit) from 69a3d82a661d0c67dadfc0c02a6839c94ab0cdfb (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 8dc51a64cf9a0bc1b467353a4161220a7cec0de0 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. 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
reply other threads:[~2008-04-15 15:35 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080415153525.6491.qmail@sourceware.org \ --to=ccaulfield@sourceware.org \ --cc=cluster-cvs@sources.redhat.com \ --cc=cluster-devel@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).