From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] hv_netvsc: Move subchannel waiting to rndis_filter_device_remove() Date: Mon, 07 Mar 2016 15:38:09 -0500 (EST) Message-ID: <20160307.153809.1538719544106524749.davem@davemloft.net> References: <1457132863-7262-1-git-send-email-haiyangz@microsoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: olaf@aepfle.de, netdev@vger.kernel.org, driverdev-devel@linuxdriverproject.org, linux-kernel@vger.kernel.org To: haiyangz@microsoft.com Return-path: In-Reply-To: <1457132863-7262-1-git-send-email-haiyangz@microsoft.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" List-Id: netdev.vger.kernel.org From: Haiyang Zhang Date: Fri, 4 Mar 2016 15:07:43 -0800 > During hot add, vmbus_device_register() is called from vmbus_onoffer(), on > the same workqueue as the subchannel offer message work-queue, so > subchannel offer won't be processed until the vmbus_device_register()/... > /netvsc_probe() is done. > Also, vmbus_device_register() is called with channel_mutex locked, which > prevents subchannel processing too. So the "waiting for sub-channel > processing" will not success in hot add case. But, in usual module loading, > the netvsc_probe() is called from different code path, and doesn't fail. > > This patch resolves the deadlock during NIC hot-add, and speeds up NIC > loading time. > > Signed-off-by: Haiyang Zhang > Reviewed-by: K. Y. Srinivasan Applied, thanks.