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

Kiryl Shutsemau <[email protected]>
Newsgroups org.kernel.vger.bpf,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest,org.kernel.vger.linux-trace-kernel,org.kvack.linux-mm
Message-ID <aow636Xhrof8hj38@thinkstation>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.