aboutsummaryrefslogtreecommitdiff
path: root/core/cpu.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2018-08-15 15:10:39 +1000
committerStewart Smith <stewart@linux.ibm.com>2018-08-16 18:42:03 +1000
commitb78d823faf4f727a113ad5907d10a45c55ca7138 (patch)
treeeef7bfa00341cf4652ba70de487b3c9b38fc1cba /core/cpu.c
parent2f2e0ee95a3da96e669b40dcb41ac14177dcac8d (diff)
downloadskiboot-b78d823faf4f727a113ad5907d10a45c55ca7138.zip
skiboot-b78d823faf4f727a113ad5907d10a45c55ca7138.tar.gz
skiboot-b78d823faf4f727a113ad5907d10a45c55ca7138.tar.bz2
cpu: Better output when waiting for a very long job
Instead of printing at the end if the job took more than 1s, print in the loop every 30s along with a backtrace. This will give us some output if the job is deadlocked. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [stewart: bump to 30s rather than 5s, preserve PR_DEBUG for >1s] Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'core/cpu.c')
-rw-r--r--core/cpu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/cpu.c b/core/cpu.c
index c6a1bf9..88477f8 100644
--- a/core/cpu.c
+++ b/core/cpu.c
@@ -300,6 +300,11 @@ void cpu_wait_job(struct cpu_job *job, bool free_it)
time_wait_ms(10);
time_waited += 10;
lwsync();
+ if ((time_waited % 30000) == 0) {
+ prlog(PR_INFO, "cpu_wait_job(%s) for %lums\n",
+ job->name, time_waited);
+ backtrace();
+ }
}
lwsync();