From mboxrd@z Thu Jan 1 00:00:00 1970 From: michaelc@cs.wisc.edu Date: Fri, 14 Jun 2013 04:56:14 -0500 Subject: [Cluster-devel] [PATCH 6/6] dlm: disable nagle for SCTP In-Reply-To: <1371203774-13141-1-git-send-email-michaelc@cs.wisc.edu> References: <1371203774-13141-1-git-send-email-michaelc@cs.wisc.edu> Message-ID: <1371203774-13141-7-git-send-email-michaelc@cs.wisc.edu> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit From: Mike Christie For TCP we disable Nagle and I cannot think of why it would be needed for SCTP. When disabled it seems to improve dlm_lock operations like it does for TCP. Signed-off-by: Mike Christie --- fs/dlm/lowcomms.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index a4fad32..4f539dd 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -1346,6 +1346,7 @@ static int sctp_listen_for_all(void) int result = -EINVAL, num = 1, i, addr_len; struct connection *con = nodeid2con(0, GFP_NOFS); int bufsize = NEEDED_RMEM; + int one = 1; if (!con) return -ENOMEM; @@ -1380,6 +1381,11 @@ static int sctp_listen_for_all(void) goto create_delsock; } + result = kernel_setsockopt(sock, SOL_SCTP, SCTP_NODELAY, (char *)&one, + sizeof(one)); + if (result < 0) + log_print("Could not set SCTP NODELAY error %d\n", result); + /* Init con struct */ sock->sk->sk_user_data = con; con->sock = sock; -- 1.7.1