[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250110102821.2a37581b@fangorn>
Date: Fri, 10 Jan 2025 10:28:21 -0500
From: Rik van Riel <riel@...riel.com>
To: Baoquan He <bhe@...hat.com>
Cc: Vivek Goyal <vgoyal@...hat.com>, Dave Young <dyoung@...hat.com>, Andrew
Morton <akpm@...ux-foundation.org>, kernel-team@...a.com, Breno
Leitão <leitao@...ian.org>, kexec@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: [PATCH] fs/proc: fix softlockup in __read_vmcore (part 2)
Since commit 5cbcb62dddf5 ("fs/proc: fix softlockup in __read_vmcore")
the number of softlockups in __read_vmcore at kdump time have gone
down, but they still happen sometimes.
In a memory constrained environment like the kdump image, a softlockup
is not just a harmless message, but it can interfere with things like
RCU freeing memory, causing the crashdump to get stuck.
The second loop in __read_vmcore has a lot more opportunities for
natural sleep points, like scheduling out while waiting for a data
write to happen, but apparently that is not always enough.
Add a cond_resched() to the second loop in __read_vmcore to
(hopefully) get rid of the softlockups.
Signed-off-by: Rik van Riel <riel@...riel.com>
Fixes: 5cbcb62dddf5 ("fs/proc: fix softlockup in __read_vmcore")
Reported-by: Breno Leitao <leitao@...ian.org>
---
fs/proc/vmcore.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
index 3d8a82cee63e..658bf199d424 100644
--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -404,6 +404,8 @@ static ssize_t __read_vmcore(struct iov_iter *iter, loff_t *fpos)
if (!iov_iter_count(iter))
return acc;
}
+
+ cond_resched();
}
return acc;
--
2.47.1
Powered by blists - more mailing lists