On Wed 2021-05-19 17:22 +0200, Vlastimil Babka wrote: > Hm, indeed, if fatal_signal_pending() is true then try_to_compact_pages() will > bail out in the for-each-zone loop after trying a single zone and if that zone > keeps returning COMPACT_SKIPPED, things can get stuck. > And direct reclaim might see compaction_ready() for another zone and return 1, > faking the progress. Indeed. > So your patch seems to be solving the issue. But maybe we should just do the > test at the beginning of should_compact_retry() and not specific to > compaction_needs_reclaim() - if there's a fatal signal, there will be no > compaction happening, so we should just say not to retry. Fair enough - I will post a v2. > I suppose if the patch fixes your situation where fatal_signal_pending() was > true, there's hopefully not a more general problem with the retry logic? At the present time, not to my knowledge. That being said, I will continue to review the relevant source code further. Kind regards, -- Aaron Tomlin