Re: [PATCH] mm: page_alloc: make defrag_mode retries follow the promoted order

From: Kiryl Shutsemau

Date: Tue Oct 06 2026 - 05:14:12 EST


On Tue, Oct 06, 2026 at 10:10:50AM +0200, Johannes Weiner wrote:
> Without counter indication, I would prefer to keep the tighter
> guarantees. ISTR this mattered on some of my ext4 tests in the past
> with the buffer locking.

OK, v2 takes the priority floor and the COMPACT_SUCCESS retry limit
from the requested order, with the explicit promoted order folded in.

> > Should defrag_mode treat MIGRATE_MOVABLE like ZONE_MOVABLE there and
> > move the page out at pin time? Ideally we might want to move it back
> > on unpin, but it can be done by compaction too.
>
> Should it even be specific to defrag_mode? I suppose without it, the
> poisoning from fallbacks would dominate by a landslide under
> pressure. But these pins can mess with compactability long before
> becoming capacity-bound.

Agreed, a pinned page in a movable block hurts compaction regardless of
defrag_mode.

It can make longterm pinning more expensive, but it is the right place
to pay the cost.

--
Kiryl Shutsemau / Kirill A. Shutemov