Skip to content

Commit

Permalink
Btrfs: add a cond_resched() into the worker loop
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
chrismason-xx committed Dec 15, 2011
1 parent 306424c commit 8f3b65a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/async-thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ static int worker_loop(void *arg)
run_ordered_completions(worker->workers, work);

check_pending_worker_creates(worker);

cond_resched();
}

spin_lock_irq(&worker->lock);
Expand Down

0 comments on commit 8f3b65a

Please sign in to comment.