aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2016-03-14 15:40:00 -0700
committerDavid S. Miller <davem@davemloft.net>2016-03-14 19:38:09 -0400
commitacffb584cda7069b0c2c83045503ccd07516a891 (patch)
tree342e4e51d76076603adba31d93313f436cf67709 /net/ipv4
parentsmc91x: avoid self-comparison warning (diff)
downloadlinux-dev-acffb584cda7069b0c2c83045503ccd07516a891.tar.xz
linux-dev-acffb584cda7069b0c2c83045503ccd07516a891.zip
net: diag: add a scheduling point in inet_diag_dump_icsk()
On loaded TCP servers, looking at millions of sockets can hold cpu for many seconds, if the lookup condition is very narrow. (eg : ss dst 1.2.3.4 ) Better add a cond_resched() to allow other processes to access the cpu. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/inet_diag.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index 50c0d96b8441..5fdb02f5598e 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -879,6 +879,7 @@ next_normal:
}
spin_unlock_bh(lock);
+ cond_resched();
}
done: