All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: [Patch net-next 2/2] netns: avoid disabling irq for netns id
Date: Sun, 4 Sep 2016 22:23:47 +0200	[thread overview]
Message-ID: <13f8e19f-1a65-c6e4-0b9c-2c0e37cadff6@6wind.com> (raw)
In-Reply-To: <CAM_iQpUZOVbYvcfK9BriSsSdsC5BMcgbWxZZJzNARV4pcTmZkA@mail.gmail.com>

Le 02/09/2016 à 19:24, Cong Wang a écrit :
> On Fri, Sep 2, 2016 at 9:39 AM, Cong Wang <xiyou.wangcong@gmail.com> wrote:
>> On Fri, Sep 2, 2016 at 1:12 AM, Nicolas Dichtel
>> <nicolas.dichtel@6wind.com> wrote:
>>> Le 02/09/2016 à 06:53, Cong Wang a écrit :
>>>> We never read or change netns id in hardirq context,
>>>> the only place we read netns id in softirq context
>>>> is in vxlan_xmit(). So, it should be enough to just
>>>> disable BH.
>>>
>>> Are you sure? Did you audit all part of the code?
>>
>> I did audit all the callers, and I didn't find any of them in IRQ context.
>>
>>> peernet2id() is called from netlink core system (do_one_broadcast()). Are you
>>> sure that no driver call this function from an hard irq context?
>>
>> I audit all callers of netlink_broadcast(), and I don't see any of
>> them in hardirq context.
> 
> Note, you can rule out most of them by checking GFP_KERNEL,
> which indicates a process context. ;) For GFP_ATOMIC cases,
> I don't see any of them in hardirq context either, but I am definitely
> not familiar with drivers like infiniband.
> 
Yes, I was thinking to that one. But I'm also not familiar with it ;-)

  reply	other threads:[~2016-09-04 20:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-02  4:53 [Patch net-next 0/2] net: some minor optimization for netns id Cong Wang
2016-09-02  4:53 ` [Patch net-next 1/2] vxlan: call peernet2id() in fdb notification Cong Wang
2016-09-02  8:59   ` Nicolas Dichtel
2016-09-02  4:53 ` [Patch net-next 2/2] netns: avoid disabling irq for netns id Cong Wang
2016-09-02  8:12   ` Nicolas Dichtel
2016-09-02 16:39     ` Cong Wang
2016-09-02 17:24       ` Cong Wang
2016-09-04 20:23         ` Nicolas Dichtel [this message]
2016-10-19 15:21     ` Elad Raz
2016-10-19 20:07       ` Cong Wang
2017-01-31  6:47         ` Elluru, Krishna Mohan
2017-01-31  6:53           ` Cong Wang
2017-01-31  7:10             ` Elluru, Krishna Mohan
2017-01-31  8:24           ` Nicolas Dichtel
2016-09-04 18:40 ` [Patch net-next 0/2] net: some minor optimization " 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=13f8e19f-1a65-c6e4-0b9c-2c0e37cadff6@6wind.com \
    --to=nicolas.dichtel@6wind.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.