lkml.org 
[lkml]   [2005]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: is synchronize_net in inet_register_protosw necessary?
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
-
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/

\
 
 \ /
  Last update: 2005-06-16 19:19    [W:0.072 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site