The extra step there wold be a hold call. The recursive _put on a
_put of some entry can happen only on dump path. As otherwise the
->next entry is first held in state delete, but would be immediately
_put on the _put as the final step of _delete().
So basically one additional atomic_inc() and one atomic_dec() on the
normal _delete() path.
Not sure about the overall penalty, but yes I know it would have some
penalty. But at least there would be no locking.
Particularly the thing that can happen on your approach is that if
there is a user land process that gets suspended during a dump
processing, it would prevent the garbage collection of all entries
for all eternity until that process is continued or killed.
So this would allow deletion and GC of entries even during walking.
But this was just a thought. Maybe it's not worth trying.
Cheers,
Timo
--
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