From: Xuehan Xu Date: Sun, 23 Jul 2023 09:33:16 +0000 (+0800) Subject: crimson/net: set TCP_NODELAY according to ms_tcp_nodelay X-Git-Tag: v19.0.0~805^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F52592%2Fhead;p=ceph.git crimson/net: set TCP_NODELAY according to ms_tcp_nodelay There are cases in which we need low latency of an individual op, like updating RBD image's object map which would block other ops for a object not created yet. We need to make sure the rbd-object-map-update like ops have as low latency as possible Fixes: https://tracker.ceph.com/issues/62098 Signed-off-by: Xuehan Xu --- diff --git a/src/crimson/net/Socket.cc b/src/crimson/net/Socket.cc index 0894724a2ffa..95b1e225034e 100644 --- a/src/crimson/net/Socket.cc +++ b/src/crimson/net/Socket.cc @@ -103,6 +103,9 @@ Socket::Socket( side(_side), ephemeral_port(e_port) { + if (local_conf()->ms_tcp_nodelay) { + socket.set_nodelay(true); + } } Socket::~Socket()