ipv4: per cpu uncached list
authorEric Dumazet <edumazet@google.com>
Wed, 14 Jan 2015 23:17:06 +0000 (15:17 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Jan 2015 23:26:16 +0000 (18:26 -0500)
commit5055c371bfd53fd369b895051b541318c2bad495
tree28748ee77408e82a64ae13dbb4bd65f1eff6aa26
parent0799c2d6f42db2b275b6479035f5b7a30ef4ee39
ipv4: per cpu uncached list

RAW sockets with hdrinc suffer from contention on rt_uncached_lock
spinlock.

One solution is to use percpu lists, since most routes are destroyed
by the cpu that created them.

It is unclear why we even have to put these routes in uncached_list,
as all outgoing packets should be freed when a device is dismantled.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Fixes: caacf05e5ad1 ("ipv4: Properly purge netdev references on uncached routes.")
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/route.h
net/ipv4/route.c