Skip to content

Commit e4f8030

Browse files
author
Mike Snitzer
committed
dm thin: add cond_resched() to various workqueue loops
Otherwise on resource constrained systems these workqueues may be too greedy. Signed-off-by: Mike Snitzer <[email protected]>
1 parent f77692d commit e4f8030

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/md/dm-thin.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2209,6 +2209,7 @@ static void process_thin_deferred_bios(struct thin_c *tc)
22092209
throttle_work_update(&pool->throttle);
22102210
dm_pool_issue_prefetches(pool->pmd);
22112211
}
2212+
cond_resched();
22122213
}
22132214
blk_finish_plug(&plug);
22142215
}
@@ -2291,6 +2292,7 @@ static void process_thin_deferred_cells(struct thin_c *tc)
22912292
else
22922293
pool->process_cell(tc, cell);
22932294
}
2295+
cond_resched();
22942296
} while (!list_empty(&cells));
22952297
}
22962298

0 commit comments

Comments
 (0)