Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <dada1@...>
Cc: <ebiederm@...>, <xemul@...>, <netdev@...>, <devel@...>
Date: Wednesday, October 31, 2007 - 7:31 pm

From: Eric Dumazet <dada1@cosmosbay.com>
Date: Wed, 31 Oct 2007 23:40:59 +0100


P4 chips are generally very poor at mispredicted branches and
atomics.  So every atomic you remove from the socket paths
gives a noticable improvement on them.

Network device reference counting is such a stupid problem.  There has
to be a way to get rid of it on the packet side.

I think we could get rid of all of the device refcounting from packets
if we:

1) Formalize "SKB roots".  This is every place a packet
   could sit in the transmit path.

2) On device unregister:

	a) wait for RCU quiesce period
	b) stop_machine_run(skb_walk_roots, netdev, NR_CPUS);

   skb_walk_roots is a function that walks all the places in
   #1, rewriting the packet to point to loopback or whatever
   instead of 'netdev' which we are trying to unregister.

This gives us two things.

First, we no longer would need to rectount net devices
for packet references.

Second, we have a debugging framework for all those dreaded SKB leaks
that keep devices from being unloadable.  As we walk the roots
we'll see where all packets referencing a device actually are.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/5] Make nicer CONFIG_NET_NS=n case code, Pavel Emelyanov, (Wed Oct 31, 3:19 pm)
Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code, Daniel Lezcano, (Wed Oct 31, 5:37 pm)
Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code, Eric Dumazet, (Wed Oct 31, 2:49 pm)
Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code, Eric W. Biederman, (Wed Oct 31, 6:05 pm)
Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code, Eric Dumazet, (Wed Oct 31, 6:40 pm)
Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code, Eric W. Biederman, (Wed Oct 31, 8:51 pm)
Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code, Eric Dumazet, (Thu Nov 1, 2:58 am)
Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code, David Miller, (Thu Nov 1, 3:02 am)
Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code, David Miller, (Wed Oct 31, 7:31 pm)
Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code, Eric W. Biederman, (Wed Oct 31, 8:58 pm)
Re: [PATCH 0/5] Make nicer CONFIG_NET_NS=n case code, Daniel Lezcano, (Wed Oct 31, 5:35 pm)
[PATCH 5/5] Hide the net_ns kmem cache, Pavel Emelyanov, (Wed Oct 31, 3:32 pm)
Re: [PATCH 5/5] Hide the net_ns kmem cache, David Miller, (Thu Nov 1, 3:47 am)
[PATCH 4/5] Mark the setup_net as __net_init, Pavel Emelyanov, (Wed Oct 31, 3:31 pm)
Re: [PATCH 4/5] Mark the setup_net as __net_init, David Miller, (Thu Nov 1, 3:46 am)
[PATCH 3/5] Hide the dead code in the net_namespace.c, Pavel Emelyanov, (Wed Oct 31, 3:28 pm)
[PATCH 2/5] Relax the reference counting of init_net_ns, Pavel Emelyanov, (Wed Oct 31, 3:25 pm)