From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753556AbcCGUiO (ORCPT ); Mon, 7 Mar 2016 15:38:14 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:53998 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753132AbcCGUiM (ORCPT ); Mon, 7 Mar 2016 15:38:12 -0500 Date: Mon, 07 Mar 2016 15:38:09 -0500 (EST) Message-Id: <20160307.153809.1538719544106524749.davem@davemloft.net> To: haiyangz@microsoft.com Cc: netdev@vger.kernel.org, kys@microsoft.com, olaf@aepfle.de, vkuznets@redhat.com, linux-kernel@vger.kernel.org, driverdev-devel@linuxdriverproject.org Subject: Re: [PATCH net-next] hv_netvsc: Move subchannel waiting to rndis_filter_device_remove() From: David Miller In-Reply-To: <1457132863-7262-1-git-send-email-haiyangz@microsoft.com> References: <1457132863-7262-1-git-send-email-haiyangz@microsoft.com> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 07 Mar 2016 12:38:11 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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.