summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@kernel.org>2023-02-16 15:29:44 -0500
committerMike Snitzer <snitzer@kernel.org>2023-02-17 14:46:27 -0500
commite4f80303c2353952e6e980b23914e4214487f2a6 (patch)
tree15b38c15db1b4c3cbf66a930cbba73fd461deac6 /drivers/md
parentf77692d65d54665d81815349cc727baa85e8b71d (diff)
downloadlinux-stable-e4f80303c2353952e6e980b23914e4214487f2a6.tar.gz
linux-stable-e4f80303c2353952e6e980b23914e4214487f2a6.tar.bz2
linux-stable-e4f80303c2353952e6e980b23914e4214487f2a6.zip
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 <snitzer@kernel.org>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-thin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index affd91a53042..6cd105c1cef3 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));
}