bcachefs: Add a cond_resched call to the copygc main loop
We seem to have a bug where the copygc thread ends up spinning and making the system unusable - this will at least prevent it from locking up the machine, and it's a good thing to have anyways. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
443d2760e5
commit
c4d4b2f01a
@ -317,6 +317,8 @@ static int bch2_copygc_thread(void *arg)
|
||||
set_freezable();
|
||||
|
||||
while (!kthread_should_stop()) {
|
||||
cond_resched();
|
||||
|
||||
if (kthread_wait_freezable(c->copy_gc_enabled))
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user