| Date | Tue, 10 Dec 2013 13:24:06 -0800 | Subject | Re: process 'stuck' at exit. | From | Linus Torvalds <> |
| |
On Tue, Dec 10, 2013 at 1:18 PM, Linus Torvalds <torvalds@linux-foundation.org> wrote: > > to get a good profile for a minute, and then looking at the > instruction-level profiles in futex_requeue() should be possible.
Ugh. Looking at kernel/futex.s even *without* debugging enabled is pretty messy. Although much of it seems to be because the hash is actually fairly complex. jhash2() really ends up expanding to a lot of instructions.
But especially if that kernel was compiled with debug information, then 'perf report' is pretty good about matching it up with the source code, so it might not be *too* hard to try to figure out where the loop is.
And if it's not in futex_requeue() (there are loops at other levels, like futex_get_key()), then having the callchain information for the costly operations will hopefully give a hint where the top loop is. So profiling data can be very powerful for things like this.
Linus
|