Re: [PATCH v2] mm/mglru: skip oom killing for order != 0 allocs in kswapd

From: Chris Down

Date: Wed Dec 02 2026 - 18:07:33 EST


Hi Barry, Bingfang,

Barry Song writes:
>I'm not really convinced this is the correct fix. It seems to work
>around an issue with min_ttl for higher-order allocations, but it
>doesn't appear to address the root cause.

Hmm... the over-reclaim for high-order wakeups does need fixing, but I
think the OOM kills are a separate regression and should be fixed on their
own. Before 30d77b7eef01 ("mm/mglru: fix ineffective protection
calculation"), lru_gen_age_node() returned early for any non-zero
sc->order, with a comment saying that this was to exclude
compaction-induced reclaim.

That commit needed the memcg walk to always run for
mem_cgroup_calculate_protection(), so the early return was dropped and the
order check went with it. Its changelog only talks about the DEF_PRIORITY
part, so it looks like the order check was lost by accident.
should_abort_scan() still has the same check with the same comment.

Thanks!

Chris