diff options
author | Mike Snitzer <snitzer@kernel.org> | 2023-02-16 15:29:44 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-11 16:31:48 +0100 |
commit | 5eac0da3f27a46096388b3135c7646751f63fd66 (patch) | |
tree | cc0ed5b86787c5ab56a7dcb27d21b5738e5656f7 /drivers/md/dm-thin.c | |
parent | a3f37c0c617b761aa39ab2e264afa5d9c698d593 (diff) | |
download | linux-stable-5eac0da3f27a46096388b3135c7646751f63fd66.tar.gz linux-stable-5eac0da3f27a46096388b3135c7646751f63fd66.tar.bz2 linux-stable-5eac0da3f27a46096388b3135c7646751f63fd66.zip |
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/dm-thin.c')
-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 386cb3395378..969ea013c74e 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -2222,6 +2222,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); } @@ -2305,6 +2306,7 @@ static void process_thin_deferred_cells(struct thin_c *tc) else pool->process_cell(tc, cell); } + cond_resched(); } while (!list_empty(&cells)); } |