linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Josh Cartwright <joshc@ni.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	tglx@linutronix.de, bigeasy@linutronix.de,
	linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Clark Williams <williams@redhat.com>
Subject: Re: [PATCH -rt] Revert "net: use synchronize_rcu_expedited()"
Date: Tue, 27 Oct 2015 12:02:51 -0300	[thread overview]
Message-ID: <20151027150251.GH9405@kernel.org> (raw)
In-Reply-To: <1445955481.7476.21.camel@edumazet-glaptop2.roam.corp.google.com>

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

  reply	other threads:[~2015-10-27 15:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26 19:14 [PATCH -rt] Revert "net: use synchronize_rcu_expedited()" Josh Cartwright
2015-10-27  0:44 ` Paul E. McKenney
2015-10-27 12:31   ` Josh Cartwright
2015-10-27 14:18     ` Eric Dumazet
2015-10-27 15:02       ` Arnaldo Carvalho de Melo [this message]
2015-10-27 15:27         ` Eric Dumazet
2015-10-27 23:15           ` Paul E. McKenney
2015-10-28  8:34             ` Josh Cartwright
2015-10-28 12:27               ` Paul E. McKenney
2015-10-30  9:16       ` 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=20151027150251.GH9405@kernel.org \
    --to=acme@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=joshc@ni.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=williams@redhat.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).