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

- From: Kiryl Shutsemau \<hidden\>
- Date: 2026-08-24 12:37:59 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2026/08/17453293
- Thread: https://ratatoskr.run/linux-mm/2026/08/17419184/t/2.md

```text
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
```
