From 63ff7809dbee337a6cfa8ab5925dbf1f840f279b Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Mon, 13 Apr 2026 11:50:16 -0700 Subject: [PATCH] Add cond_resched in block_free_work I'm seeing consistent CPU soft lockups in block_free_work on my bare metal system that aren't reached by VM instances. The reason is that the bare metal machine has a ton more memory available causing the block free work queue to grow much larger in size, and then it has so much work that it can take 30+ seconds before it goes through it all. This is all with a debug kernel. A non debug kernel will likely zoom through the outstanding work here at a much faster rate. Signed-off-by: Auke Kok --- kmod/src/block.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kmod/src/block.c b/kmod/src/block.c index adba8c39..5ad81377 100644 --- a/kmod/src/block.c +++ b/kmod/src/block.c @@ -218,6 +218,7 @@ static void block_free_work(struct work_struct *work) llist_for_each_entry_safe(bp, tmp, deleted, free_node) { block_free(sb, bp); + cond_resched(); } }