<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Hi, there,&nbsp;</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; ">some user space threads, say thread-X stuck in&nbsp;<span style="font-size: 16px; ">&nbsp;<span style="font-size: 16px; ">sleep_on_page_killable&nbsp;</span>@ filemap_fault()</span>.&nbsp;</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0,
 0); background-color: transparent; font-style: normal; ">my question is :&nbsp;</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; ">in normal flow, how to wakeup thread-X from&nbsp;wait_on_page_locked_killable() ? How can I go further to debug this issue?&nbsp;</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; ">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...&nbsp;</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; ">hope anyone can give me some practical tips.&nbsp;</div><div style="font-family:
 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; "><br></div><div style="background-color: transparent; "><div style="background-color: transparent; "><div style="background-color: transparent; "><font face="times new roman, new york, times, serif">Call Trace:</font></div><div style="background-color: transparent; "><font face="times new roman, new york, times, serif">&nbsp;[&lt;c1895675&gt;] schedule+0x35/0x50</font></div><div style="background-color: transparent; "><font face="times new roman, new york, times, serif">&nbsp;[&lt;c1895708&gt;] io_schedule+0x78/0xb0</font></div><div style="background-color: transparent; "><font face="times new roman, new york, times, serif">&nbsp;[&lt;c12c95fd&gt;] sleep_on_page_killable+0xd/0x40</font></div><div style="background-color: transparent; "><font face="times new roman, new york, times, serif">&nbsp;[&lt;c1895f3f&gt;]
 __wait_on_bit+0x4f/0x70</font></div><div style="background-color: transparent; "><font face="times new roman, new york, times, serif">&nbsp;[&lt;c12cbcae&gt;] wait_on_page_bit_killable+0x8e/0x90</font></div><div style="background-color: transparent; "><font face="times new roman, new york, times, serif">&nbsp;[&lt;c12cbd42&gt;] __lock_page_or_retry+0x92/0xb0</font></div><div style="background-color: transparent; "><font face="times new roman, new york, times, serif">&nbsp;[&lt;c12cc041&gt;] filemap_fault+0x2e1/0x400</font></div><div style="background-color: transparent; "><font face="times new roman, new york, times, serif">&nbsp;[&lt;c12e55be&gt;] __do_fault+0x3e/0x390</font></div><div style="background-color: transparent; "><font face="times new roman, new york, times, serif">&nbsp;[&lt;c12e72ac&gt;] handle_pte_fault+0x7c/0x930</font></div><div style="background-color: transparent; "><font face="times new roman, new york, times,
 serif">&nbsp;[&lt;c12e7bf3&gt;] handle_mm_fault+0x93/0xc0</font></div><div style="background-color: transparent; "><font face="times new roman, new york, times, serif">&nbsp;[&lt;c189a98e&gt;] do_page_fault+0x10e/0x4b0</font></div><div style="background-color: transparent; "><font face="times new roman, new york, times, serif">&nbsp;[&lt;c189881b&gt;] error_code+0x5f/0x64</font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal; "><font face="times new roman, new york, times, serif"><br></font></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal; "><font face="times new roman, new york, times, serif">here is the kernel code in filemap.c&nbsp;</font></div><div style="background-color: transparent; "><font face="times new roman, new
 york, times, serif"><div style="background-color: transparent; ">static inline int wait_on_page_locked_killable(struct page *page)</div><div style="background-color: transparent; ">{</div><div style="background-color: transparent; "><span class="Apple-tab-span" style="white-space:pre">        </span>if (PageLocked(page))</div><div style="background-color: transparent; "><span class="Apple-tab-span" style="white-space:pre">                </span>return wait_on_page_bit_killable(page, PG_locked);</div><div style="background-color: transparent; "><span class="Apple-tab-span" style="white-space:pre">        </span>return 0;</div><div style="background-color: transparent; ">}</div><div style="background-color: transparent; "><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal; ">here is ftrace result:&nbsp;</div><div style="background-color: transparent; "><div
 style="background-color: transparent; ">&nbsp;3) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp;filemap_fault() {</div><div style="background-color: transparent; ">&nbsp;3) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp;find_get_page() {</div><div style="background-color: transparent; ">&nbsp;3) &nbsp; 0.259 us &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;__rcu_read_lock();</div><div style="background-color: transparent; ">&nbsp;3) &nbsp; 0.217 us &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp;__rcu_read_unlock();</div><div style="background-color: transparent; ">&nbsp;3) &nbsp; 7.432 us &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp;}</div><div style="background-color: transparent; ">&nbsp;3) &nbsp; 0.244 us &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp;__might_sleep();</div><div style="background-color: transparent; ">&nbsp;3) + 12.206 us &nbsp; | &nbsp; &nbsp;}</div><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new
 york', times, serif; font-size: 16px; font-style: normal; "><br></div></div></font></div></div></div>  </div></body></html>