]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/hv/channel.c
Drivers: hv: vmbus: vmbus_sendpacket_ctl: hvsock: avoid unnecessary signaling
[mirror_ubuntu-bionic-kernel.git] / drivers / hv / channel.c
index 1161d68a18635d0c43c6722c78f1594c9c992045..3f04533021468666e102a65a3692f0aec3824e1c 100644 (file)
@@ -659,6 +659,9 @@ int vmbus_sendpacket_ctl(struct vmbus_channel *channel, void *buffer,
         * If we cannot write to the ring-buffer; signal the host
         * even if we may not have written anything. This is a rare
         * enough condition that it should not matter.
+        * NOTE: in this case, the hvsock channel is an exception, because
+        * it looks the host side's hvsock implementation has a throttling
+        * mechanism which can hurt the performance otherwise.
         */
 
        if (channel->signal_policy)
@@ -666,7 +669,8 @@ int vmbus_sendpacket_ctl(struct vmbus_channel *channel, void *buffer,
        else
                kick_q = true;
 
-       if (((ret == 0) && kick_q && signal) || (ret))
+       if (((ret == 0) && kick_q && signal) ||
+           (ret && !is_hvsock_channel(channel)))
                vmbus_setevent(channel);
 
        return ret;