arm64: MTE swap and hibernation support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | mm: Add PG_ARCH_2 page flagfs/ include/ include/ +3 more | +20 | 0 replies | |
| 2/4 | mm: Add arch hooks for saving/restoring tagsinclude/ mm/ mm/ +1 more | +37 | 3 replies | |
| 3/4 | arm64: mte: Enable swap of tagged pagesarch/ arch/ arch/ +3 more | +200 | 4 replies | |
| 4/4 | arm64: mte: Save tags when hibernatingarch/ | +116 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] arm64: MTE swap and hibernation support
This adds support for swapping and hibernation with MTE tagged memory. It's based on Catalin's v3 series[1].
To support swap, a new page flag is added which tracks whether a page has been mapped into user space with MTE enabled (and therefore may have valid data in the tags). Arch hooks are added to enable the saving/restoring of these tags (in memory) when the pages are swapped out.
Hibernation builds on the swap support by simply copying the tags out of hardware tag storage into normal memory before the hibernation image is created. On restore the tags are returned to the hardware tag storage.
Feedback on the approach is welcomed.
[1] https://lore.kernel.org/linux-arm-kernel/[email protected]/
Steven Price (4):
mm: Add PG_ARCH_2 page flag
mm: Add arch hooks for saving/restoring tags
arm64: mte: Enable swap of tagged pages
arm64: mte: Save tags when hibernating
arch/arm64/Kconfig | 2 +- arch/arm64/include/asm/mte.h | 6 ++ arch/arm64/include/asm/pgtable.h | 44 ++++++++++++ arch/arm64/kernel/hibernate.c | 116 ++++++++++++++++++++++++++++++ arch/arm64/lib/mte.S | 50 +++++++++++++ arch/arm64/mm/Makefile | 2 +- arch/arm64/mm/mteswap.c | 98 +++++++++++++++++++++++++ fs/proc/page.c | 3 + include/asm-generic/pgtable.h | 23 ++++++ include/linux/kernel-page-flags.h | 1 + include/linux/page-flags.h | 3 + include/trace/events/mmflags.h | 9 ++- mm/Kconfig | 3 + mm/page_io.c | 6 ++ mm/shmem.c | 6 ++ mm/swapfile.c | 2 + tools/vm/page-types.c | 2 + 17 files changed, 373 insertions(+), 3 deletions(-) create mode 100644 arch/arm64/mm/mteswap.c
Signature · 1 line
2.20.1