diff options
author | Mike Snitzer <snitzer@kernel.org> | 2023-02-16 23:29:44 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-11 18:39:54 +0300 |
commit | 52206dd1c77f04093be0dce7c9a6d58634ae6a53 (patch) | |
tree | 559584976c7f96de32037ca5283a2a33dbc9e2af /drivers | |
parent | 861229a52bac05d8259346fe6959d125676b63cb (diff) | |
download | linux-52206dd1c77f04093be0dce7c9a6d58634ae6a53.tar.xz |
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')
-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 f3c519e18a12..c890bb3e5185 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -2217,6 +2217,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); } @@ -2299,6 +2300,7 @@ static void process_thin_deferred_cells(struct thin_c *tc) else pool->process_cell(tc, cell); } + cond_resched(); } while (!list_empty(&cells)); } |