Skip to contentSkip to conversation

Patch "dm thin: add cond_resched() to various workqueue loops" has been added to the 5.4-stable tree

dm-devel Sasha Levin 1 participant 1 message Mar 5, 2023 Device mapper

lore
Share & tools
lore

Sasha Levin

author Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

dm thin: add cond_resched() to various workqueue loops

to the 5.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
dm-thin-add-cond_resched-to-various-workqueue-loops.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

commit 1b3dbf62fcc037c1fc113025e46da228db0390ca

Author: Mike Snitzer <[email protected]>
Date:   Thu Feb 16 15:29:44 2023 -0500

dm thin: add cond_resched() to various workqueue loops

[ Upstream commit e4f80303c2353952e6e980b23914e4214487f2a6 ]

Otherwise on resource constrained systems these workqueues may be too greedy.

drivers/md/dm-thin.c +2 -0
index 4f161725dda0a..999447bde8203 100644
@@ -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));
 }
 

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel