From: "Paul E. McKenney" <paulmck@us.ibm.com>
To: junjie cai <junjiec@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>, shemminger@osdl.org
Subject: Re: is synchronize_net in inet_register_protosw necessary?
Date: Thu, 16 Jun 2005 10:15:02 -0700 [thread overview]
Message-ID: <20050616171502.GA1321@us.ibm.com> (raw)
In-Reply-To: <ca992f11050614071857cd069b@mail.gmail.com>
On Tue, Jun 14, 2005 at 11:18:08PM +0900, junjie cai wrote:
> hi all.
> i am a newbie to linux kernel.
> in a arm926 board i found that it took about 30ms to finish
> the (net/ipv4/af_inet.c:898) inet_register_protosw
> because of the synchronize_net call during profiling.
> synchronize_net finally calls synchronize_rcu, so i think
> this is to make the change visiable after a list_add_rcu.
> but according to the Document/listRCU.txt it seems that
> a list insertation does not necessarily do call_rcu etc.
> may i have any mistakes, please kindly tell me.
>From a strict RCU viewpoint, you are quite correct. But sometimes
the overall locking protocol (which almost always includes other things
besides just RCU) places additional constraints on the code. My guess is
that the networking folks needed to ensure that the new protocol is seen
by all packets that are received after inet_register_protosw() returns.
But I need to defer to networking guys on this one.
Thanx, Paul
next prev parent reply other threads:[~2005-06-16 17:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-14 14:18 is synchronize_net in inet_register_protosw necessary? junjie cai
2005-06-16 17:15 ` Paul E. McKenney [this message]
2005-06-16 22:07 ` Paul E. McKenney
2005-06-17 1:37 ` junjie cai
2005-06-18 1:35 ` 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=20050616171502.GA1321@us.ibm.com \
--to=paulmck@us.ibm.com \
--cc=junjiec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=shemminger@osdl.org \
/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