]> git.baikalelectronics.ru Git - kernel.git/commit
[TCPv4]: Improve BH latency in /proc/net/tcp
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 11 Jun 2007 00:33:08 +0000 (17:33 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 11 Jul 2007 05:06:20 +0000 (22:06 -0700)
commitf8297a51631fed882953257ab50d726dc99d492b
treef84fa3241fddf8ed8320ace50fed11170ce7860b
parent1a7f42d4e849c1e60213dffffeeb509136fcef63
[TCPv4]: Improve BH latency in /proc/net/tcp

Currently the code for /proc/net/tcp disable BH while iterating
over the entire established hash table.  Even though we call
cond_resched_softirq for each entry, we still won't process
softirq's as regularly as we would otherwise do which results
in poor performance when the system is loaded near capacity.

This anomaly comes from the 2.4 code where this was all in a
single function and the local_bh_disable might have made sense
as a small optimisation.

The cost of each local_bh_disable is so small when compared
against the increased latency in keeping it disabled over a
large but mostly empty TCP established hash table that we
should just move it to the individual read_lock/read_unlock
calls as we do in inet_diag.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_ipv4.c