[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpUq14GsvGyz2xA1PkDq5YO743T68Zh2zm=NJZQ9S2Ahqg@mail.gmail.com>
Date: Sun, 13 Nov 2016 22:47:01 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc: Rolf Neugebauer <rolf.neugebauer@...ker.com>,
LKML <linux-kernel@...r.kernel.org>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
Justin Cormack <justin.cormack@...ker.com>,
Ian Campbell <ian.campbell@...ker.com>
Subject: Re: Long delays creating a netns after deleting one (possibly RCU related)
On Fri, Nov 11, 2016 at 4:55 PM, Cong Wang <xiyou.wangcong@...il.com> wrote:
> On Fri, Nov 11, 2016 at 4:23 PM, Paul E. McKenney
> <paulmck@...ux.vnet.ibm.com> wrote:
>>
>> Ah! This net_mutex is different than RTNL. Should synchronize_net() be
>> modified to check for net_mutex being held in addition to the current
>> checks for RTNL being held?
>>
>
> Good point!
>
> Like commit be3fc413da9eb17cce0991f214ab0, checking
> for net_mutex for this case seems to be an optimization, I assume
> synchronize_rcu_expedited() and synchronize_rcu() have the same
> behavior...
Thinking a bit more, I think commit be3fc413da9eb17cce0991f
gets wrong on rtnl_is_locked(), the lock could be locked by other
process not by the current one, therefore it should be
lockdep_rtnl_is_held() which, however, is defined only when LOCKDEP
is enabled... Sigh.
I don't see any better way than letting callers decide if they want the
expedited version or not, but this requires changes of all callers of
synchronize_net(). Hm.
Powered by blists - more mailing lists