diff options
author | Mike Snitzer <snitzer@kernel.org> | 2023-02-16 15:29:44 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-10 09:34:01 +0100 |
commit | e2c4490d40319a31786e04ec8b048565a259e20b (patch) | |
tree | a302e034f66acae1fbaaf4c33f38ac83750ec242 /drivers/md | |
parent | bea13417361a953729edef54cb3686dcc5301ff5 (diff) | |
download | linux-e2c4490d40319a31786e04ec8b048565a259e20b.tar.gz |
dm thin: add cond_resched() to various workqueue loops
[ Upstream commit e4f80303c2353952e6e980b23914e4214487f2a6 ] Otherwise on resource constrained systems these workqueues may be too greedy. Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-thin.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index 196f82559ad6..d28c9077d6ed 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -2207,6 +2207,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); } @@ -2289,6 +2290,7 @@ static void process_thin_deferred_cells(struct thin_c *tc) else pool->process_cell(tc, cell); } + cond_resched(); } while (!list_empty(&cells)); } |