From: Eric Dumazet <dada1@cosmosbay•com>
To: "David S. Miller" <davem@davemloft•net>
Cc: Linux Netdev List <netdev@vger•kernel.org>,
"Paul E. McKenney" <paulmck@linux•vnet.ibm.com>
Subject: [PATCH] net: remove superfluous call to synchronize_net()
Date: Wed, 15 Apr 2009 17:38:06 +0200 [thread overview]
Message-ID: <49E5FF5E.50409@cosmosbay.com> (raw)
inet_register_protosw() is adding inet_protosw to inetsw[] with appropriate
locking section and rcu variant. No need to call synchronize_net() to wait
for a RCU grace period. Changes are immediatly visible to other cpus anyway.
This saves about 13 ms on boot time on a HZ=1000 8 cpus machine ;)
(4 calls to inet_register_protosw(), and about 3200 us per call)
But more seriously, we should audit all synchronize_{rcu|net}() calls
to make sure we dont waste time and hide some bugs because of artificial
delays.
Signed-off-by: Eric Dumazet <dada1@cosmosbay•com>
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 7f03373..1706896 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1003,8 +1003,6 @@ void inet_register_protosw(struct inet_protosw *p)
out:
spin_unlock_bh(&inetsw_lock);
- synchronize_net();
-
return;
out_permanent:
next reply other threads:[~2009-04-15 15:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-15 15:38 Eric Dumazet [this message]
2009-04-15 21:54 ` [PATCH] net: remove superfluous call to synchronize_net() Paul E. McKenney
2009-04-16 5:40 ` Eric Dumazet
2009-04-16 15:52 ` Paul E. McKenney
2009-04-16 16:03 ` Eric Dumazet
2009-04-16 18:02 ` Paul E. McKenney
2009-04-16 18:43 ` Eric Dumazet
2009-04-17 11:56 ` David Miller
2009-04-17 19:25 ` Paul E. McKenney
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=49E5FF5E.50409@cosmosbay.com \
--to=dada1@cosmosbay$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
--cc=paulmck@linux$(echo .)vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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