Re: Scalability of interface creation and deletion

Eric Dumazet
2011-05-07T16:38:01Z

Le samedi 07 mai 2011 à 09:23 -0700, Ben Greear a écrit :

> I wonder if it would be worth having a 'delete me soon'
> method to delete interfaces that would not block on the
> RCU code.
>
> The controlling programs could use netlink messages to
> know exactly when an interface was truly gone.
>
> That should allow some batching in the sync-net logic
> too, if user-space code deletes 1000 interfaces very
> quickly, for instance...
>

I suggested in the past to have an extension of batch capabilities, so
that one kthread could have 3 separate lists of devices being destroyed
in //,

This daemon would basically loop on one call to synchronize_rcu(), and
transfert list3 to deletion, list2 to list3, list1 to list2, loop,
eventually releasing RTNL while blocked in synchronize_rcu()

This would need to allow as you suggest an asynchronous deletion method,
or use a callback to wake the process blocked on device delete.

Right now, we hold RTNL for the whole 3 steps process, so we cannot use
any parallelism.