[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170620.130840.472295224655944129.davem@davemloft.net>
Date: Tue, 20 Jun 2017 13:08:40 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: bigeasy@...utronix.de
Cc: edumazet@...gle.com, netdev@...r.kernel.org, tglx@...utronix.de
Subject: Re: [PATCH 1/2] net/core: use local_bh_disable() in netif_rx_ni()
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Date: Fri, 16 Jun 2017 19:23:59 +0200
> In 2004 [0] netif_rx_ni() gained a preempt_disable() section around
> netif_rx() and its do_softirq() + testing for it. The do_softirq() part
> is required because netif_rx() raises the softirq but does not invoke
> it. The preempt_disable() is required to avoid running the BH in
> parallel.
> All this can be avoided be putting this into a local_bh_disable()ed
> section. The local_bh_enable() part will invoke do_softirq() if
> required.
>
> [0] Make netif_rx_ni preempt-safe
> http://oss.sgi.com/projects/netdev/archive/2004-10/msg02211.html
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Why make extra work? The current code is cheaper.
Doing all of that dance with the local_bh_enable() function call is
more expensive than the inlined counter bump and softirq state
check.
I'm not applying this without a better justification, sorry.
Powered by blists - more mailing lists