]> git.baikalelectronics.ru Git - kernel.git/commit
net: diag: add a scheduling point in inet_diag_dump_icsk()
authorEric Dumazet <edumazet@google.com>
Mon, 14 Mar 2016 22:40:00 +0000 (15:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Mar 2016 23:38:09 +0000 (19:38 -0400)
commit5a1537c1acfbb2ca1ead818921b89118cf3c731c
tree342e4e51d76076603adba31d93313f436cf67709
parent74b931a98a0d3bdd1fc52066e04d173d2b694642
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>
net/ipv4/inet_diag.c