From: Mike Snitzer Date: Thu, 16 Feb 2023 20:29:44 +0000 (-0500) Subject: dm thin: add cond_resched() to various workqueue loops X-Git-Tag: v6.6.17~5251^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4f80303c2353952e6e980b23914e4214487f2a6;p=platform%2Fkernel%2Flinux-rpi.git 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 --- diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index affd91a..6cd105c 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -2209,6 +2209,7 @@ static void process_thin_deferred_bios(struct thin_c *tc) throttle_work_update(&pool->throttle); dm_pool_issue_prefetches(pool->pmd); } + cond_resched(); } blk_finish_plug(&plug); } @@ -2291,6 +2292,7 @@ static void process_thin_deferred_cells(struct thin_c *tc) else pool->process_cell(tc, cell); } + cond_resched(); } while (!list_empty(&cells)); }