]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/net: set TCP_NODELAY according to ms_tcp_nodelay 52592/head
authorXuehan Xu <xuxuehan@qianxin.com>
Sun, 23 Jul 2023 09:33:16 +0000 (17:33 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Mon, 24 Jul 2023 01:43:37 +0000 (09:43 +0800)
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 <xuxuehan@qianxin.com>
src/crimson/net/Socket.cc

index 0894724a2ffa4214d30752a9622212c22cadc75f..95b1e225034eb567b1bdf1a1107437d6ad84d2df 100644 (file)
@@ -103,6 +103,9 @@ Socket::Socket(
     side(_side),
     ephemeral_port(e_port)
 {
+  if (local_conf()->ms_tcp_nodelay) {
+    socket.set_nodelay(true);
+  }
 }
 
 Socket::~Socket()