mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
dm thin: add cond_resched() to various workqueue loops
[ Upstream commit e4f80303c2 ]
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
bea1341736
commit
e2c4490d40
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user