Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1320119

[PATCH 07/13] Drivers: hv: vmbus: vmbus_sendpacket_ctl: hvsock: avoid unnecessary signaling

From "K. Y. Srinivasan" <kys@microsoft.com>
Newsgroups linux.kernel
Subject [PATCH 07/13] Drivers: hv: vmbus: vmbus_sendpacket_ctl: hvsock: avoid unnecessary signaling
Date 2016-01-28 00:00 +0100
Message-ID <qVHec-2ip-59@gated-at.bofh.it> (permalink)
References <qVHea-2ip-5@gated-at.bofh.it> <qVHea-2ip-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Dexuan Cui <decui@microsoft.com>

When the hvsock channel's outbound ringbuffer is full (i.e.,
hv_ringbuffer_write() returns -EAGAIN), we should avoid the unnecessary
signaling the host.

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
 drivers/hv/channel.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 1161d68..3f04533 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -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;
-- 
1.7.4.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 01/13] tools/hv: Use include/uapi with __EXPORTED_HEADERS__ "K. Y. Srinivasan" <kys@microsoft.com> - 2016-01-28 00:00 +0100
  [PATCH 03/13] Drivers: hv: vmbus: avoid scheduling in interrupt context in vmbus_initiate_unload() "K. Y. Srinivasan" <kys@microsoft.com> - 2016-01-28 00:00 +0100
  [PATCH 05/13] Drivers: hv: vmbus: add a helper function to set a channel's pending send size "K. Y. Srinivasan" <kys@microsoft.com> - 2016-01-28 00:00 +0100
  [PATCH 04/13] Drivers: hv: vmbus: don't manipulate with clocksources on crash "K. Y. Srinivasan" <kys@microsoft.com> - 2016-01-28 00:00 +0100
  [PATCH 13/13] Drivers: hv: vmbus: Give control over how the ring access is serialized "K. Y. Srinivasan" <kys@microsoft.com> - 2016-01-28 00:00 +0100
  [PATCH 02/13] Drivers: hv: vmbus: avoid infinite loop in init_vp_index() "K. Y. Srinivasan" <kys@microsoft.com> - 2016-01-28 00:00 +0100
  [PATCH 12/13] Drivers: hv: vmbus: Eliminate the spin lock on the read path "K. Y. Srinivasan" <kys@microsoft.com> - 2016-01-28 00:00 +0100
  [PATCH 07/13] Drivers: hv: vmbus: vmbus_sendpacket_ctl: hvsock: avoid unnecessary signaling "K. Y. Srinivasan" <kys@microsoft.com> - 2016-01-28 00:00 +0100
  [PATCH 08/13] Drivers: hv: vmbus: define a new VMBus message type for hvsock "K. Y. Srinivasan" <kys@microsoft.com> - 2016-01-28 00:00 +0100

csiph-web