Skip to content

Commit 86e92ad

Browse files
Mike Christieteigland
authored andcommitted
dlm: disable nagle for SCTP
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 <michaelc@cs.wisc.edu> Signed-off-by: David Teigland <teigland@redhat.com>
1 parent 5d68987 commit 86e92ad

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎fs/dlm/lowcomms.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,6 +1346,7 @@ static int sctp_listen_for_all(void)
13461346
int result = -EINVAL, num = 1, i, addr_len;
13471347
struct connection *con = nodeid2con(0, GFP_NOFS);
13481348
int bufsize = NEEDED_RMEM;
1349+
int one = 1;
13491350

13501351
if (!con)
13511352
return -ENOMEM;
@@ -1380,6 +1381,11 @@ static int sctp_listen_for_all(void)
13801381
goto create_delsock;
13811382
}
13821383

1384+
result = kernel_setsockopt(sock, SOL_SCTP, SCTP_NODELAY, (char *)&one,
1385+
sizeof(one));
1386+
if (result < 0)
1387+
log_print("Could not set SCTP NODELAY error %d\n", result);
1388+
13831389
/* Init con struct */
13841390
sock->sk->sk_user_data = con;
13851391
con->sock = sock;

0 commit comments

Comments
 (0)