projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db19170
)
inet: add a schedule point in inet_twsk_purge()
author
Eric Dumazet
<edumazet@google.com>
Thu, 19 Mar 2015 00:40:51 +0000
(17:40 -0700)
committer
David S. Miller
<davem@davemloft.net>
Thu, 19 Mar 2015 02:38:13 +0000
(22:38 -0400)
On a large hash table, we can easily spend seconds to
walk over all entries. Add a cond_resched() to yield
cpu if necessary.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/inet_timewait_sock.c
patch
|
blob
|
history
diff --git
a/net/ipv4/inet_timewait_sock.c
b/net/ipv4/inet_timewait_sock.c
index
86ebf02
..
f38e387
100644
(file)
--- a/
net/ipv4/inet_timewait_sock.c
+++ b/
net/ipv4/inet_timewait_sock.c
@@
-487,6
+487,7
@@
void inet_twsk_purge(struct inet_hashinfo *hashinfo,
for (slot = 0; slot <= hashinfo->ehash_mask; slot++) {
struct inet_ehash_bucket *head = &hashinfo->ehash[slot];
restart_rcu:
+ cond_resched();
rcu_read_lock();
restart:
sk_nulls_for_each_rcu(sk, node, &head->chain) {