From: Kirill Tkhai <ktkhai@virtuozzo.com>
To: Stephen Hemminger <stephen@networkplumber.org>
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
Subject: Re: [PATCH 1/3] net: Kill net_mutex
Date: Wed, 21 Feb 2018 13:16:05 +0300 [thread overview]
Message-ID: <ccf18e7d-1918-c0ac-9a1c-4289ed1c76dc@virtuozzo.com> (raw)
In-Reply-To: <20180220151857.542d7225@xeon-e3>
Hi, Stephen,
On 21.02.2018 02:18, Stephen Hemminger wrote:
> On Mon, 19 Feb 2018 12:58:38 +0300
> Kirill Tkhai <ktkhai@virtuozzo.com> 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
next prev parent reply other threads:[~2018-02-21 10:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-19 9:58 [PATCH 0/3] net: Get rid of net_mutex and simplify cleanup_list queueing Kirill Tkhai
2018-02-19 9:58 ` [PATCH 1/3] net: Kill net_mutex Kirill Tkhai
2018-02-20 23:18 ` Stephen Hemminger
2018-02-21 10:16 ` Kirill Tkhai [this message]
2018-02-19 9:58 ` [PATCH 2/3] net: Make cleanup_list and net::cleanup_list of llist type Kirill Tkhai
2018-02-20 19:42 ` Cong Wang
2018-02-21 8:30 ` Kirill Tkhai
2018-02-19 9:58 ` [PATCH 3/3] net: Queue net_cleanup_work only if there is first net added Kirill Tkhai
2018-02-19 13:52 ` [PATCH 0/3] net: Get rid of net_mutex and simplify cleanup_list queueing Kirill Tkhai
2018-02-20 18:24 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ccf18e7d-1918-c0ac-9a1c-4289ed1c76dc@virtuozzo.com \
--to=ktkhai@virtuozzo.com \
--cc=avagin@virtuozzo.com \
--cc=davem@davemloft.net \
--cc=fw@strlen.de \
--cc=gregkh@linuxfoundation.org \
--cc=leonro@mellanox.com \
--cc=mark.rutland@arm.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=roman.kapl@sysgo.com \
--cc=stephen@networkplumber.org \
--cc=vyasevic@redhat.com \
--cc=vyasevich@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).