Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1256837

Re: [PATCH -rt] Revert "net: use synchronize_rcu_expedited()"

From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH -rt] Revert "net: use synchronize_rcu_expedited()"
Date 2015-10-27 16:10 +0100
Message-ID <qoe2S-6JM-41@gated-at.bofh.it> (permalink)
References <qnVtg-3HO-5@gated-at.bofh.it> <qo0CC-6Jf-9@gated-at.bofh.it> <qobHJ-5cG-27@gated-at.bofh.it> <qodgu-6dy-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Em Tue, Oct 27, 2015 at 07:18:01AM -0700, Eric Dumazet escreveu:
> On Tue, 2015-10-27 at 07:31 -0500, Josh Cartwright wrote:
> 
> > Okay, yes, I like the first suggestion better as well, I've included a
> > patch below that does just that.  I hope you don't mind me turning it
> > into a Suggested-by :).
> > 
> > Thanks for taking a look!
> >   Josh
> 
> 
> > @@ -6969,7 +6969,7 @@ EXPORT_SYMBOL(free_netdev);
> >  void synchronize_net(void)
> >  {
> >  	might_sleep();
> > -	if (rtnl_is_locked())
> > +	if (rtnl_is_locked() && !IS_ENABLED(CONFIG_PREEMPT_RT_FULL))
> >  		synchronize_rcu_expedited();
> >  	else
> >  		synchronize_rcu();
> 
> No objection from me. Thanks.
> 
> Acked-by: Eric Dumazet <edumazet@google.com>

The first suggestion, with it disabled by default seems to be the most
flexible tho, i.e, Paul's original message plus the boot parameter line:

Alternatively, a boot-time option could be used:

int some_rt_boot_parameter = CONFIG_SYNC_NET_DEFAULT;

        if (rtnl_is_locked() && !some_rt_boot_parameter)
                synchronize_rcu_expedited();
        else
                synchronize_rcu();

Then RT oriented kernel .config files would have CONFIG_SYNC_NET_DEFAULT
set to 1, while upstream would have this default to 0.

RT oriented kernel users could try using this in some scenarios where
networking is not the critical path.

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH -rt] Revert "net: use synchronize_rcu_expedited()" Josh Cartwright <joshc@ni.com> - 2015-10-26 20:20 +0100
  Re: [PATCH -rt] Revert "net: use synchronize_rcu_expedited()" "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-27 01:50 +0100
    Re: [PATCH -rt] Revert "net: use synchronize_rcu_expedited()" Josh Cartwright <joshc@ni.com> - 2015-10-27 13:40 +0100
      Re: [PATCH -rt] Revert "net: use synchronize_rcu_expedited()" Eric Dumazet <eric.dumazet@gmail.com> - 2015-10-27 15:20 +0100
        Re: [PATCH -rt] Revert "net: use synchronize_rcu_expedited()" Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-27 16:10 +0100
          Re: [PATCH -rt] Revert "net: use synchronize_rcu_expedited()" Eric Dumazet <eric.dumazet@gmail.com> - 2015-10-27 16:30 +0100
            Re: [PATCH -rt] Revert "net: use synchronize_rcu_expedited()" "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-28 00:20 +0100
              Re: [PATCH -rt] Revert "net: use synchronize_rcu_expedited()" Josh Cartwright <joshc@ni.com> - 2015-10-28 09:40 +0100
                Re: [PATCH -rt] Revert "net: use synchronize_rcu_expedited()" "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-28 13:30 +0100
        Re: [PATCH -rt] Revert "net: use synchronize_rcu_expedited()" David Miller <davem@davemloft.net> - 2015-10-30 10:20 +0100

csiph-web