neigh: Convert garbage collection from softirq to workqueue
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 30 Jul 2009 03:15:07 +0000 (03:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Aug 2009 01:35:16 +0000 (18:35 -0700)
commite4c4e448cf557921ffbbbd6d6ddac81fdceacb4f
tree6813f4b0228e1ec26c26c5c56ef980a2a7c0963c
parent1e3e238e9c4bf9987b19185235cd0cdc21ea038c
neigh: Convert garbage collection from softirq to workqueue

Current neigh_periodic_timer() function is fired by timer IRQ, and
scans one hash bucket each round (very litle work in fact)

As we are supposed to scan whole hash table in 15 seconds, this means
neigh_periodic_timer() can be fired very often. (depending on the number
of concurrent hash entries we stored in this table)

Converting this to a workqueue permits scanning whole table, minimizing
icache pollution, and firing this work every 15 seconds, independantly
of hash table size.

This 15 seconds delay is not a hard number, as work is a deferrable one.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/neighbour.h
net/core/neighbour.c