Re: [RFC PATCH 12/57] mm/collapse: allocate a destination per candidate

From: Kiryl Shutsemau

Date: Mon Aug 24 2026 - 08:38:27 EST


On Mon, Aug 24, 2026 at 07:20:05PM +0800, Lance Yang wrote:
> >+ if (unlikely(mem_cgroup_charge(folio, mm, gfp)) ||
> >+ folio_memcg_alloc_deferred(folio)) {
>
> One small nit: folio_memcg_alloc_deferred() passes GFP_KERNEL to the
> deferred_split_lru allocation.

...

> This only affects calls that find the metadata missing; after it has been
> installed, later calls take the fast branch. Still, it bypasses the gfp
> with direct reclaim stripped for the freeze window. Could
> folio_memcg_alloc_deferred() take that gfp here?

Right. Passing down gfp is the right thing to do here.

Thanks, will fix.

--
Kiryl Shutsemau / Kirill A. Shutemov