* [dm-devel] Patch "dm cache: add cond_resched() to various workqueue loops" has been added to the 5.15-stable tree
@ 2023-03-05 3:27 Sasha Levin
0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2023-03-05 3:27 UTC (permalink / raw)
To: stable-commits, snitzer; +Cc: dm-devel, Alasdair Kergon
This is a note to let you know that I've just added the patch titled
dm cache: add cond_resched() to various workqueue loops
to the 5.15-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-cache-add-cond_resched-to-various-workqueue-loops.patch
and it can be found in the queue-5.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
commit 0b71e066e848f069a2cca9e1e69ef61fb08a58b4
Author: Mike Snitzer <snitzer@kernel.org>
Date: Thu Feb 16 15:31:08 2023 -0500
dm cache: add cond_resched() to various workqueue loops
[ Upstream commit 76227f6dc805e9e960128bcc6276647361e0827c ]
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>
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index abfe7e37b76f4..24cd28ea2c595 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -1813,6 +1813,7 @@ static void process_deferred_bios(struct work_struct *ws)
else
commit_needed = process_bio(cache, bio) || commit_needed;
+ cond_resched();
}
if (commit_needed)
@@ -1835,6 +1836,7 @@ static void requeue_deferred_bios(struct cache *cache)
while ((bio = bio_list_pop(&bios))) {
bio->bi_status = BLK_STS_DM_REQUEUE;
bio_endio(bio);
+ cond_resched();
}
}
@@ -1875,6 +1877,8 @@ static void check_migrations(struct work_struct *ws)
r = mg_start(cache, op, NULL);
if (r)
break;
+
+ cond_resched();
}
}
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-05 3:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-05 3:27 [dm-devel] Patch "dm cache: add cond_resched() to various workqueue loops" has been added to the 5.15-stable tree Sasha Levin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.