neigh: reduce arp latency
commitcd28ca0a3dd17c68d24b839602a0e6268ad28b5d
authorEric Dumazet <eric.dumazet@gmail.com>
Tue, 9 Aug 2011 08:15:58 +0000 (9 08:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 Aug 2011 09:55:28 +0000 (12 02:55 -0700)
tree3e77945743e2c74c36b6942ad5bfe46a07eb9caa
parent68c3e5a7b91513010d2536e4bcd7bdd54d0e6acf
neigh: reduce arp latency

Remove the artificial HZ latency on arp resolution.

Instead of firing a timer in one jiffy (up to 10 ms if HZ=100), lets
send the ARP message immediately.

Before patch :

# arp -d 192.168.20.108 ; ping -c 3 192.168.20.108
PING 192.168.20.108 (192.168.20.108) 56(84) bytes of data.
64 bytes from 192.168.20.108: icmp_seq=1 ttl=64 time=9.91 ms
64 bytes from 192.168.20.108: icmp_seq=2 ttl=64 time=0.065 ms
64 bytes from 192.168.20.108: icmp_seq=3 ttl=64 time=0.061 ms

After patch :

$ arp -d 192.168.20.108 ; ping -c 3 192.168.20.108
PING 192.168.20.108 (192.168.20.108) 56(84) bytes of data.
64 bytes from 192.168.20.108: icmp_seq=1 ttl=64 time=0.152 ms
64 bytes from 192.168.20.108: icmp_seq=2 ttl=64 time=0.064 ms
64 bytes from 192.168.20.108: icmp_seq=3 ttl=64 time=0.074 ms

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