diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-12-15 09:29:43 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-12-15 10:50:38 -0500 |
commit | 8f3b65a3d66bcc086e1eb040b7545e70681f2ed1 (patch) | |
tree | 3111f24d0e0391f8a1dac3f0a7fb9bff05e2b4bd /fs | |
parent | 306424cc880a0fbbdc99eee1f43d056a301a180f (diff) |
Btrfs: add a cond_resched() into the worker loop
If we have a constant stream of end_io completions or crc work,
we can hit softlockup messages from the async helper threads. This
adds a cond_resched() into the loop to avoid them.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/async-thread.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index 7ec14097fef1..203e849dc9c9 100644 --- a/fs/btrfs/async-thread.c +++ b/fs/btrfs/async-thread.c | |||
@@ -331,7 +331,7 @@ again: | |||
331 | run_ordered_completions(worker->workers, work); | 331 | run_ordered_completions(worker->workers, work); |
332 | 332 | ||
333 | check_pending_worker_creates(worker); | 333 | check_pending_worker_creates(worker); |
334 | 334 | cond_resched(); | |
335 | } | 335 | } |
336 | 336 | ||
337 | spin_lock_irq(&worker->lock); | 337 | spin_lock_irq(&worker->lock); |