From: Nicolas Dichtel Date: Wed, 29 Oct 2014 18:29:31 +0000 (+0100) Subject: neigh: optimize neigh_parms_release() X-Git-Tag: omap-for-v3.20/drop-legacy-3517~122^2~320 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75fbfd33234a71556bec34b099d98f970190905d;p=pandora-kernel.git neigh: optimize neigh_parms_release() In neigh_parms_release() we loop over all entries to find the entry given in argument and being able to remove it from the list. By using a double linked list, we can avoid this loop. Here are some numbers with 30 000 dummy interfaces configured: Before the patch: $ time rmmod dummy real 2m0.118s user 0m0.000s sys 1m50.048s After the patch: $ time rmmod dummy real 1m9.970s user 0m0.000s sys 0m47.976s Suggested-by: Thierry Herbelot Signed-off-by: Nicolas Dichtel Acked-by: Eric Dumazet Signed-off-by: David S. Miller --- Reading git-diff-tree failed