how to debug thread stuck in filemap_fault
shuang liu
l121282s at yahoo.com.cn
Wed May 15 06:19:40 EDT 2013
Hi, there,
some user space threads, say thread-X stuck in sleep_on_page_killable @ filemap_fault().
my question is :
in normal flow, how to wakeup thread-X from wait_on_page_locked_killable() ? How can I go further to debug this issue?
I try to use ftrace function_graph to trace the flow, but it can only log EXPORT_SYMBOL_GPL() functions. I am struggling with huge memory and file system source code...
hope anyone can give me some practical tips.
Call Trace:
[<c1895675>] schedule+0x35/0x50
[<c1895708>] io_schedule+0x78/0xb0
[<c12c95fd>] sleep_on_page_killable+0xd/0x40
[<c1895f3f>] __wait_on_bit+0x4f/0x70
[<c12cbcae>] wait_on_page_bit_killable+0x8e/0x90
[<c12cbd42>] __lock_page_or_retry+0x92/0xb0
[<c12cc041>] filemap_fault+0x2e1/0x400
[<c12e55be>] __do_fault+0x3e/0x390
[<c12e72ac>] handle_pte_fault+0x7c/0x930
[<c12e7bf3>] handle_mm_fault+0x93/0xc0
[<c189a98e>] do_page_fault+0x10e/0x4b0
[<c189881b>] error_code+0x5f/0x64
here is the kernel code in filemap.c
static inline int wait_on_page_locked_killable(struct page *page)
{
if (PageLocked(page))
return wait_on_page_bit_killable(page, PG_locked);
return 0;
}
here is ftrace result:
3) | filemap_fault() {
3) | find_get_page() {
3) 0.259 us | __rcu_read_lock();
3) 0.217 us | __rcu_read_unlock();
3) 7.432 us | }
3) 0.244 us | __might_sleep();
3) + 12.206 us | }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130515/c8463ebf/attachment-0001.html
More information about the Kernelnewbies
mailing list