Message ID | 20180815051039.7019-5-benh@kernel.crashing.org |
---|---|
State | Accepted |
Headers | show |
Series | [1/5] phb4: Workaround PHB errata with CFG write UR/CA errors | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | master/apply_patch Successfully applied |
snowpatch_ozlabs/make_check | success | Test make_check on branch master |
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes: > Instead of printing at the end if the job took more than 1s, > print in the loop every 5s along with a backtrace. This will > give us some output if the job is deadlocked. > > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> > --- > core/cpu.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) Cool, as discussed on Slack, I've taken 2-5 now and bumped the time period in 5 to 30s rather than 5s. So, 2-5 merged to master as of b78d823faf4f727a113ad5907d10a45c55ca7138
diff --git a/core/cpu.c b/core/cpu.c index a4c4d4ff..7ae2ba11 100644 --- a/core/cpu.c +++ b/core/cpu.c @@ -300,13 +300,14 @@ void cpu_wait_job(struct cpu_job *job, bool free_it) time_wait_ms(10); time_waited += 10; lwsync(); + if ((time_waited % 5000) == 0) { + prlog(PR_INFO, "cpu_wait_job(%s) for %lums\n", + job->name, time_waited); + backtrace(); + } } lwsync(); - if (time_waited > 1000) - prlog(PR_DEBUG, "cpu_wait_job(%s) for %lums\n", - job->name, time_waited); - if (free_it) free(job); }
Instead of printing at the end if the job took more than 1s, print in the loop every 5s along with a backtrace. This will give us some output if the job is deadlocked. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> --- core/cpu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)