1

bcachefs: Add a cond_resched() to rebalance loop

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2020-01-16 16:20:53 -05:00 committed by Kent Overstreet
parent 952070908f
commit 6876d2ab78

View File

@ -183,6 +183,8 @@ static int bch2_rebalance_thread(void *arg)
prev_cputime = curr_cputime(); prev_cputime = curr_cputime();
while (!kthread_wait_freezable(r->enabled)) { while (!kthread_wait_freezable(r->enabled)) {
cond_resched();
start = jiffies; start = jiffies;
cputime = curr_cputime(); cputime = curr_cputime();