Re: [syzbot] [mm?] INFO: rcu detected stall in khugepaged (3)
Andrew Morton <[email protected]>
| Newsgroups | gmane.linux.kernel,gmane.linux.kernel.mm |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 04 Aug 2026 17:01:48 -0700 syzbot <[email protected]> wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit: 3708dd948844 Merge tag 'pm-7.2-rc6' of git://git.kernel.or.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=11ac703e580000 > kernel config: https://syzkaller.appspot.com/x/.config?x=4e38b15c29e6a1d9 > dashboard link: https://syzkaller.appspot.com/bug?extid=d2401aeb74cc84adba04 > compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8 > > Unfortunately, I don't have any reproducer for this issue yet. Thanks. Lazy optimists (ahem) paste this gunk into Gemini and ask "what the heck just happened". The results are often useful, but should be treated with skepticism. In this case I think it came usably close. https://share.gemini.google/vq4TLhTiLBih tl;dr: khugepaged's collapse_scan_file() is taking too long and RCU got starved. I don't think khugepaged is doing anything wrong here, per-se. There's a lot of work to do and we're doing it. An appropriate fix would be to take a break, let RCU do its thing then get back to work. But I don't think RCU offers interfaces for that? collapse_scan_file()'s main loop has if (need_resched()) { xas_pause(&xas); cond_resched_rcu(); } but that won't help with the RCU stall detector(?). I suggest that a suitable fix here would be to add the analogous if (rcu_i_need_to_take_a_break()) { rcu_read_unlock(); rcu_take_a_break()) rcu_read_lock(); } (iirc rcu_read_unlock() does an rcu run, so rcu_take_a_break() isn't needed here) Paul, wdyt?