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


Groups > linux.kernel > #1513309

RE: [PATCH v2] Drivers: hv: vmbus: Raise retry/wait limits in vmbus_post_msg()

From Haiyang Zhang <haiyangz@microsoft.com>
Newsgroups linux.kernel
Subject RE: [PATCH v2] Drivers: hv: vmbus: Raise retry/wait limits in vmbus_post_msg()
Date 2016-11-01 16:30 +0100
Message-ID <syJaH-1ZX-43@gated-at.bofh.it> (permalink)
References <syHsd-Q3-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



> -----Original Message-----
> From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com]
> Sent: Tuesday, November 1, 2016 9:34 AM
> To: devel@linuxdriverproject.org
> Cc: linux-kernel@vger.kernel.org; KY Srinivasan <kys@microsoft.com>;
> Haiyang Zhang <haiyangz@microsoft.com>; Van De Ven, Arjan
> <arjan.van.de.ven@intel.com>
> Subject: [PATCH v2] Drivers: hv: vmbus: Raise retry/wait limits in
> vmbus_post_msg()
> 
> DoS protection conditions were altered in WS2016 and now it's easy to
> get
> -EAGAIN returned from vmbus_post_msg() (e.g. when we try changing MTU on
> a
> netvsc device in a loop). All vmbus_post_msg() callers don't retry the
> operation and we usually end up with a non-functional device or crash.
> 
> While host's DoS protection conditions are unknown to me my tests show
> that
> it can take up to 10 seconds before the message is sent so doing udelay()
> is not an option, we really need to sleep. Almost all vmbus_post_msg()
> callers are ready to sleep but there is one special case:
> vmbus_initiate_unload() which can be called from interrupt/NMI context
> and
> we can't sleep there. I'm also not sure about the lonely
> vmbus_send_tl_connect_request() which has no in-tree users but its
> external
> users are most likely waiting for the host to reply so sleeping there is
> also appropriate.
> 
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
> - Changes since v1: keep microsecods delays and udelay() for first
> attempts
>   [KY Srinivasan, Arjan Van De Ven]
> ---
>  drivers/hv/channel.c      | 17 +++++++++--------
>  drivers/hv/channel_mgmt.c | 10 ++++++----
>  drivers/hv/connection.c   | 17 ++++++++++++-----
>  drivers/hv/hyperv_vmbus.h |  2 +-
>  4 files changed, 28 insertions(+), 18 deletions(-)
> 

Thank you.

Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>

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


Thread

[PATCH v2] Drivers: hv: vmbus: Raise retry/wait limits in vmbus_post_msg() Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-11-01 14:40 +0100
  RE: [PATCH v2] Drivers: hv: vmbus: Raise retry/wait limits in  vmbus_post_msg() Haiyang Zhang <haiyangz@microsoft.com> - 2016-11-01 16:30 +0100

csiph-web