Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Greg KH <gregkh <at> suse.de>
Subject: [64/93] dst: call cond_resched() in dst_gc_task()
Newsgroups: gmane.linux.kernel
Date: Friday 19th February 2010 16:29:57 UTC (over 6 years ago)
2.6.32-stable review patch.  If anyone has any objections, please let us
know.

------------------

From: Eric Dumazet 

commit 2fc1b5dd99f66d93ffc23fd8df82d384c1a354c8 upstream.

Kernel bugzilla #15239

On some workloads, it is quite possible to get a huge dst list to
process in dst_gc_task(), and trigger soft lockup detection.

Fix is to call cond_resched(), as we run in process context.

Reported-by: Pawel Staszewski 
Tested-by: Pawel Staszewski 
Signed-off-by: Eric Dumazet 
Signed-off-by: David S. Miller 
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 net/core/dst.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -17,6 +17,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -79,6 +80,7 @@ loop:
 	while ((dst = next) != NULL) {
 		next = dst->next;
 		prefetch(&next->next);
+		cond_resched();
 		if (likely(atomic_read(&dst->__refcnt))) {
 			last->next = dst;
 			last = dst;
 
CD: 3ms