Re: [PATCH v3] mm: introduce copy_mc_highpages() and batch copy in folio_mc_copy()
From: Garg, Shivank
Date: Thu Nov 26 2026 - 13:44:27 EST
On Mon, 2026-11-23 at 17:23 +0100, David Hildenbrand (Arm) wrote:
> On 11/13/26 18:09, Shivank Garg wrote:
> > folio_mc_copy() copies a folio one page at a time with copy_mc_highpage(),
<snip>
> > -
> > - return 0;
> > + return copy_mc_highpages(folio_page(dst, 0), folio_page(src, 0),
> > + folio_nr_pages(src));
> > }
>
> What bugs me a bit is that we are not tackling copy_user_large_folio(). So this
> looks incomplete.
>
> There, we still have this. That keeps this process_huge_page() machinery alive,
> and a special case for gigantic pages (copy_user_gigantic_page).
Agreed.
>
> Meanwhile, folio_zero_user() moved to a range-based approach and abandoned that.
>
> Can we clean all that up as well while we are at it?
>
> These look like excellent candidats for using copy_mc_user_highpages() as well.
I've started working on this and the cleanups around it.
As copy_mc_highpages() patch stands on its own, I'd prefer to post those as follow-up
series on top.
Does that work for you, or would you prefer it in one series together?
Thanks,
Shivank