Re: [RFC V3 PATCH] arm64: mm: swap: save and restore mte tags for large folios

From: Barry Song
Date: Wed Nov 15 2023 - 15:49:29 EST


On Wed, Nov 15, 2023 at 11:16 PM David Hildenbrand <david@xxxxxxxxxx> wrote:
>
> On 14.11.23 02:43, Barry Song wrote:
> > This patch makes MTE tags saving and restoring support large folios,
> > then we don't need to split them into base pages for swapping out
> > on ARM64 SoCs with MTE.
> >
> > arch_prepare_to_swap() should take folio rather than page as parameter
> > because we support THP swap-out as a whole.
> >
> > Meanwhile, arch_swap_restore() should use page parameter rather than
> > folio as swap-in always works at the granularity of base pages right
> > now.
>
> ... but then we always have order-0 folios and can pass a folio, or what
> am I missing?

Hi David,
you missed the discussion here:

https://lore.kernel.org/lkml/CAGsJ_4yXjex8txgEGt7+WMKp4uDQTn-fR06ijv4Ac68MkhjMDw@xxxxxxxxxxxxxx/
https://lore.kernel.org/lkml/CAGsJ_4xmBAcApyK8NgVQeX_Znp5e8D4fbbhGguOkNzmh1Veocg@xxxxxxxxxxxxxx/

>
> >
> > arch_thp_swp_supported() is dropped since ARM64 MTE was the only one
> > who needed it.
>
> Can we do that separately?

i think it is ok.

>
> --
> Cheers,
>
> David / dhildenb
>

Thanks
Barry