[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1457995200.31401.28.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Mon, 14 Mar 2016 15:40:00 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: "David S. Miller" <davem@...emloft.net>
Cc: netdev@...r.kernel.org
Subject: [PATCH net] net: diag: add a scheduling point in
inet_diag_dump_icsk()
From: Eric Dumazet <edumazet@...gle.com>
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@...gle.com>
---
net/ipv4/inet_diag.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index 6029157..7883473 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:
Powered by blists - more mailing lists