소스 검색

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>
Chris Mason 13 년 전
부모
커밋
8f3b65a3d6
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      fs/btrfs/async-thread.c

+ 1 - 1
fs/btrfs/async-thread.c

@@ -331,7 +331,7 @@ again:
 			run_ordered_completions(worker->workers, work);
 
 			check_pending_worker_creates(worker);
-
+			cond_resched();
 		}
 
 		spin_lock_irq(&worker->lock);