Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b46b2cb authored by Mike Snitzer's avatar Mike Snitzer Committed by Greg Kroah-Hartman
Browse files

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: default avatarMike Snitzer <snitzer@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 2c055b6a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2224,6 +2224,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);
}
@@ -2307,6 +2308,7 @@ static void process_thin_deferred_cells(struct thin_c *tc)
			else
				pool->process_cell(tc, cell);
		}
		cond_resched();
	} while (!list_empty(&cells));
}