All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Hanging when parking smp threads
@ 2017-09-06 21:37 Justin Chen
  0 siblings, 0 replies; only message in thread
From: Justin Chen @ 2017-09-06 21:37 UTC (permalink / raw)
  To: Florian Fainelli, linux-mips

Hello,

I've been trying to trace down a hang issue for ages now, can't seem
to get to the root of the problem. I'm wondering if anyone else has
seen anything similar or has any suggestions.

I am testing on a bmips chip on kernel version 4.1.20. I don't see the
problem on ARM, so I have a suspicion there might be an issue with the
smp mips specific code, but I cannot put my finger on it.

The hang occurs when stress testing suspend and resume. Everyone once
in a while it hangs when going into suspend and I see the following.

1. CPU 0 brings down other CPUs for suspend and attempts to parks smp
threads. It waits for each thread to be parked before moving on.
kernel/power/suspend.c: disable_nonboot_cpus()
kernel/cpu.c: _cpu_down() then smpboot_park_threads()

2. CPU X(nonboot cpu) parks all smpboot threads except the last one.
Then it hangs here.
Under further inspection I see the following...
The thread that needs to be parked is never scheduled instead it is
waiting in the wake_list within the cpu runqueue(The cpu that should
be parking the thread).
The CPU (with its wait_list populated) is staying in the idle task
loop. It never schedules the next task in the wait_list.

I've tried pulling in potential fixes from upstream, but everything i
tried so far has failed to fix the hang.

I am running out of ideas on how to debug this. So any pointers on how
to get deeper into the issue would be much appreciated. Thanks!

Justin
.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-06 21:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-06 21:37 [RFC] Hanging when parking smp threads Justin Chen

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.