From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Subject: Re: [PATCH 09/16] virtio-net: drop config_mutex Date: Mon, 06 Oct 2014 16:07:32 +0400 Message-ID: <54328604.30403@cogentembedded.com> References: <1412525038-15871-1-git-send-email-mst@redhat.com> <1412525038-15871-10-git-send-email-mst@redhat.com> <54328107.5090400@cogentembedded.com> <20141006115636.GA26184@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20141006115636.GA26184@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: "Michael S. Tsirkin" Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org List-Id: virtualization@lists.linuxfoundation.org On 10/6/2014 3:56 PM, Michael S. Tsirkin wrote: >>> config_mutex served two purposes: prevent multiple concurrent config >>> change handlers, and synchronize access to config_enable flag. >>> Since commit dbf2576e37da0fcc7aacbfbb9fd5d3de7888a3c1 >>> workqueue: make all workqueues non-reentrant >>> all workqueues are non-reentrant, and config_enable >>> is now gone. >>> Get rid of the unnecessary lock. >>> Signed-off-by: Michael S. Tsirkin >>> --- >>> drivers/net/virtio_net.c | 7 +------ >>> 1 file changed, 1 insertion(+), 6 deletions(-) >>> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c >>> index fa17afa..d80fef4 100644 >>> --- a/drivers/net/virtio_net.c >>> +++ b/drivers/net/virtio_net.c >> [...] >>> @@ -1430,7 +1426,7 @@ static void virtnet_config_changed_work(struct work_struct *work) >>> netif_tx_stop_all_queues(vi->dev); >>> } >>> done: >>> - mutex_unlock(&vi->config_lock); >>> + return; >> There's no need for this *return*. > I know - it's removed by the follow-up patch. Yeah, I saw. > It's formatted like this to make diff smaller > and make review easier. Don't understand how adding this line makes diff smaller though... You first need to add it and then to delete it, where's the save? WBR, Sergei From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752592AbaJFMHg (ORCPT ); Mon, 6 Oct 2014 08:07:36 -0400 Received: from mail-lb0-f182.google.com ([209.85.217.182]:41784 "EHLO mail-lb0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752560AbaJFMHe (ORCPT ); Mon, 6 Oct 2014 08:07:34 -0400 Message-ID: <54328604.30403@cogentembedded.com> Date: Mon, 06 Oct 2014 16:07:32 +0400 From: Sergei Shtylyov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: "Michael S. Tsirkin" CC: linux-kernel@vger.kernel.org, Rusty Russell , virtualization@lists.linux-foundation.org, netdev@vger.kernel.org Subject: Re: [PATCH 09/16] virtio-net: drop config_mutex References: <1412525038-15871-1-git-send-email-mst@redhat.com> <1412525038-15871-10-git-send-email-mst@redhat.com> <54328107.5090400@cogentembedded.com> <20141006115636.GA26184@redhat.com> In-Reply-To: <20141006115636.GA26184@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/6/2014 3:56 PM, Michael S. Tsirkin wrote: >>> config_mutex served two purposes: prevent multiple concurrent config >>> change handlers, and synchronize access to config_enable flag. >>> Since commit dbf2576e37da0fcc7aacbfbb9fd5d3de7888a3c1 >>> workqueue: make all workqueues non-reentrant >>> all workqueues are non-reentrant, and config_enable >>> is now gone. >>> Get rid of the unnecessary lock. >>> Signed-off-by: Michael S. Tsirkin >>> --- >>> drivers/net/virtio_net.c | 7 +------ >>> 1 file changed, 1 insertion(+), 6 deletions(-) >>> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c >>> index fa17afa..d80fef4 100644 >>> --- a/drivers/net/virtio_net.c >>> +++ b/drivers/net/virtio_net.c >> [...] >>> @@ -1430,7 +1426,7 @@ static void virtnet_config_changed_work(struct work_struct *work) >>> netif_tx_stop_all_queues(vi->dev); >>> } >>> done: >>> - mutex_unlock(&vi->config_lock); >>> + return; >> There's no need for this *return*. > I know - it's removed by the follow-up patch. Yeah, I saw. > It's formatted like this to make diff smaller > and make review easier. Don't understand how adding this line makes diff smaller though... You first need to add it and then to delete it, where's the save? WBR, Sergei