diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-02-08 18:00:39 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-08 18:00:39 -0500 |
commit | 2fc1b5dd99f66d93ffc23fd8df82d384c1a354c8 (patch) | |
tree | 7a0cdb9d0c683a7f7883f96a903eda997c90e2df /net/core | |
parent | d696c7bdaa55e2208e56c6f98e6bc1599f34286d (diff) |
dst: call cond_resched() in dst_gc_task()
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 <pstaszewski@itcare.pl>
Tested-by: Pawel Staszewski <pstaszewski@itcare.pl>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dst.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/dst.c b/net/core/dst.c index 57bc4d5b8d08..cb1b3488b739 100644 --- a/net/core/dst.c +++ b/net/core/dst.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | #include <net/net_namespace.h> | 19 | #include <net/net_namespace.h> |
20 | #include <linux/sched.h> | ||
20 | 21 | ||
21 | #include <net/dst.h> | 22 | #include <net/dst.h> |
22 | 23 | ||
@@ -79,6 +80,7 @@ loop: | |||
79 | while ((dst = next) != NULL) { | 80 | while ((dst = next) != NULL) { |
80 | next = dst->next; | 81 | next = dst->next; |
81 | prefetch(&next->next); | 82 | prefetch(&next->next); |
83 | cond_resched(); | ||
82 | if (likely(atomic_read(&dst->__refcnt))) { | 84 | if (likely(atomic_read(&dst->__refcnt))) { |
83 | last->next = dst; | 85 | last->next = dst; |
84 | last = dst; | 86 | last = dst; |