* [PATCH net-next-2.6] net: speedup netdev_set_master()
@ 2010-03-18 23:37 Eric Dumazet
2010-03-19 5:22 ` David Miller
2010-03-22 1:37 ` David Miller
0 siblings, 2 replies; 7+ messages in thread
From: Eric Dumazet @ 2010-03-18 23:37 UTC (permalink / raw)
To: David Miller; +Cc: netdev
We currently force a synchronize_net() in netdev_set_master()
This seems necessary only when a slave had a master and we dismantle it.
In the other case ("ifenslave bond0 ethO"), we dont need this long
delay.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
diff --git a/net/core/dev.c b/net/core/dev.c
index 17b1686..ff578ff 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3733,11 +3733,10 @@ int netdev_set_master(struct net_device *slave, struct net_device *master)
slave->master = master;
- synchronize_net();
-
- if (old)
+ if (old) {
+ synchronize_net();
dev_put(old);
-
+ }
if (master)
slave->flags |= IFF_SLAVE;
else
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net-next-2.6] net: speedup netdev_set_master()
2010-03-18 23:37 [PATCH net-next-2.6] net: speedup netdev_set_master() Eric Dumazet
@ 2010-03-19 5:22 ` David Miller
2010-03-19 5:28 ` Eric Dumazet
2010-03-22 1:37 ` David Miller
1 sibling, 1 reply; 7+ messages in thread
From: David Miller @ 2010-03-19 5:22 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 19 Mar 2010 00:37:40 +0100
> We currently force a synchronize_net() in netdev_set_master()
>
> This seems necessary only when a slave had a master and we dismantle it.
>
> In the other case ("ifenslave bond0 ethO"), we dont need this long
> delay.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Depends upon the net-2.6 race fix?
Thanks for telling me :-/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next-2.6] net: speedup netdev_set_master()
2010-03-19 5:22 ` David Miller
@ 2010-03-19 5:28 ` Eric Dumazet
2010-03-19 5:36 ` David Miller
0 siblings, 1 reply; 7+ messages in thread
From: Eric Dumazet @ 2010-03-19 5:28 UTC (permalink / raw)
To: David Miller; +Cc: netdev
Le jeudi 18 mars 2010 à 22:22 -0700, David Miller a écrit :
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Fri, 19 Mar 2010 00:37:40 +0100
>
> > We currently force a synchronize_net() in netdev_set_master()
> >
> > This seems necessary only when a slave had a master and we dismantle it.
> >
> > In the other case ("ifenslave bond0 ethO"), we dont need this long
> > delay.
> >
> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>
> Depends upon the net-2.6 race fix?
>
> Thanks for telling me :-/
I believe it's not related. It's net-next-2.6 material, for sure :)
But yes, I discovered the race fix while studying netdev_set_master()
Thanks David
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next-2.6] net: speedup netdev_set_master()
2010-03-19 5:28 ` Eric Dumazet
@ 2010-03-19 5:36 ` David Miller
2010-03-19 5:45 ` Eric Dumazet
0 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2010-03-19 5:36 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 19 Mar 2010 06:28:11 +0100
> Le jeudi 18 mars 2010 à 22:22 -0700, David Miller a écrit :
>> From: Eric Dumazet <eric.dumazet@gmail.com>
>> Date: Fri, 19 Mar 2010 00:37:40 +0100
>>
>> > We currently force a synchronize_net() in netdev_set_master()
>> >
>> > This seems necessary only when a slave had a master and we dismantle it.
>> >
>> > In the other case ("ifenslave bond0 ethO"), we dont need this long
>> > delay.
>> >
>> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>>
>> Depends upon the net-2.6 race fix?
>>
>> Thanks for telling me :-/
>
> I believe it's not related. It's net-next-2.6 material, for sure :)
It was not an issue of related, but rather "B won't apply cleanly
without A". Even line offsets can make "git apply" reject.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next-2.6] net: speedup netdev_set_master()
2010-03-19 5:36 ` David Miller
@ 2010-03-19 5:45 ` Eric Dumazet
2010-03-19 6:11 ` David Miller
0 siblings, 1 reply; 7+ messages in thread
From: Eric Dumazet @ 2010-03-19 5:45 UTC (permalink / raw)
To: David Miller; +Cc: netdev
Le jeudi 18 mars 2010 à 22:36 -0700, David Miller a écrit :
> It was not an issue of related, but rather "B won't apply cleanly
> without A". Even line offsets can make "git apply" reject.
> --
I see, I can resubmit later if you prefer, once net-2.6 fix is pulled in
net-next, there is no hurry :)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next-2.6] net: speedup netdev_set_master()
2010-03-19 5:45 ` Eric Dumazet
@ 2010-03-19 6:11 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2010-03-19 6:11 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 19 Mar 2010 06:45:13 +0100
> Le jeudi 18 mars 2010 à 22:36 -0700, David Miller a écrit :
>> It was not an issue of related, but rather "B won't apply cleanly
>> without A". Even line offsets can make "git apply" reject.
>> --
>
> I see, I can resubmit later if you prefer, once net-2.6 fix is pulled in
> net-next, there is no hurry :)
No need, just let me know about this stuff in the future, that's
all :-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next-2.6] net: speedup netdev_set_master()
2010-03-18 23:37 [PATCH net-next-2.6] net: speedup netdev_set_master() Eric Dumazet
2010-03-19 5:22 ` David Miller
@ 2010-03-22 1:37 ` David Miller
1 sibling, 0 replies; 7+ messages in thread
From: David Miller @ 2010-03-22 1:37 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 19 Mar 2010 00:37:40 +0100
> We currently force a synchronize_net() in netdev_set_master()
>
> This seems necessary only when a slave had a master and we dismantle it.
>
> In the other case ("ifenslave bond0 ethO"), we dont need this long
> delay.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-03-22 1:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-18 23:37 [PATCH net-next-2.6] net: speedup netdev_set_master() Eric Dumazet
2010-03-19 5:22 ` David Miller
2010-03-19 5:28 ` Eric Dumazet
2010-03-19 5:36 ` David Miller
2010-03-19 5:45 ` Eric Dumazet
2010-03-19 6:11 ` David Miller
2010-03-22 1:37 ` David Miller
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).