From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ve1eur01on0103.outbound.protection.outlook.com ([104.47.1.103]:62929 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932742AbeBUKQQ (ORCPT ); Wed, 21 Feb 2018 05:16:16 -0500 Subject: Re: [PATCH 1/3] net: Kill net_mutex To: Stephen Hemminger Cc: davem@davemloft.net, nicolas.dichtel@6wind.com, vyasevic@redhat.com, paulmck@linux.vnet.ibm.com, vyasevich@gmail.com, mark.rutland@arm.com, gregkh@linuxfoundation.org, leonro@mellanox.com, avagin@virtuozzo.com, fw@strlen.de, roman.kapl@sysgo.com, netdev@vger.kernel.org References: <151903409491.8021.11032992295248447417.stgit@localhost.localdomain> <151903431795.8021.5069678488269142143.stgit@localhost.localdomain> <20180220151857.542d7225@xeon-e3> From: Kirill Tkhai Message-ID: Date: Wed, 21 Feb 2018 13:16:05 +0300 MIME-Version: 1.0 In-Reply-To: <20180220151857.542d7225@xeon-e3> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: Hi, Stephen, On 21.02.2018 02:18, Stephen Hemminger wrote: > On Mon, 19 Feb 2018 12:58:38 +0300 > Kirill Tkhai wrote: > >> + struct list_head exit_list; /* To linked to call pernet exit >> + * methods on dead net (net_sem >> + * read locked), or to unregister >> + * pernet ops (net_sem wr locked). >> + */ > > Sorry, that comment is completely unparseable. > Either you know what it does, and therefore comment is unnecessary > Or change comment to a valid explanation of the semantics of the list. > > Maybe comments about locking model are best left to where > it is used in the code. Let's improve it :) It's used to call pernet exit methods, and net ns logic guarantees, we never call exit methods for the same net in parallel. How about writing this directly without mention of net_sem? Something like this: /* To link net to call pernet exit methods */ Or maybe you have better variant? Thanks, Kirill