diff options
| -rw-r--r-- | kernel/workqueue.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 3992cf6c3ee3..6202b08f1933 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
| @@ -2253,7 +2253,25 @@ repeat: | |||
| 2253 | if (get_work_pwq(work) == pwq) | 2253 | if (get_work_pwq(work) == pwq) |
| 2254 | move_linked_works(work, scheduled, &n); | 2254 | move_linked_works(work, scheduled, &n); |
| 2255 | 2255 | ||
| 2256 | process_scheduled_works(rescuer); | 2256 | if (!list_empty(scheduled)) { |
| 2257 | process_scheduled_works(rescuer); | ||
| 2258 | |||
| 2259 | /* | ||
| 2260 | * The above execution of rescued work items could | ||
| 2261 | * have created more to rescue through | ||
| 2262 | * pwq_activate_first_delayed() or chained | ||
| 2263 | * queueing. Let's put @pwq back on mayday list so | ||
| 2264 | * that such back-to-back work items, which may be | ||
| 2265 | * being used to relieve memory pressure, don't | ||
| 2266 | * incur MAYDAY_INTERVAL delay inbetween. | ||
| 2267 | */ | ||
| 2268 | if (need_to_create_worker(pool)) { | ||
| 2269 | spin_lock(&wq_mayday_lock); | ||
| 2270 | get_pwq(pwq); | ||
| 2271 | list_move_tail(&pwq->mayday_node, &wq->maydays); | ||
| 2272 | spin_unlock(&wq_mayday_lock); | ||
| 2273 | } | ||
| 2274 | } | ||
| 2257 | 2275 | ||
| 2258 | /* | 2276 | /* |
| 2259 | * Put the reference grabbed by send_mayday(). @pool won't | 2277 | * Put the reference grabbed by send_mayday(). @pool won't |
