]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
icmp: No need to call sk_write_space()
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 24 Sep 2009 12:16:51 +0000 (12:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Oct 2009 07:21:54 +0000 (00:21 -0700)
commitb3a5b6cc7cab89dcc3301add750f88019d910a2b
treeb22e79b455ee2c9b3b131ef1dcf9d997a24fe2ce
parenta9828ec6bc0b7e19a65f7e13daa8bd35a926a753
icmp: No need to call sk_write_space()

We can make icmp messages tx completion callback a litle bit faster.

Setting SOCK_USE_WRITE_QUEUE sk flag tells sock_wfree() to
not call sk_write_space() on a socket we know no thread is posssibly
waiting for write space. (on per cpu kernel internal icmp sockets only)

This avoids the sock_def_write_space() call and
read_lock(&sk->sk_callback_lock)/read_unlock(&sk->sk_callback_lock) calls
as well.

We avoid three atomic ops.

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