From: Steven Price <steven.price@arm.com> To: linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org Cc: Steven Price <steven.price@arm.com>, linux-arch@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>, Arnd Bergmann <arnd@arndb.de>, Catalin Marinas <catalin.marinas@arm.com>, Hugh Dickins <hughd@google.com>, Vincenzo Frascino <vincenzo.frascino@arm.com>, Will Deacon <will@kernel.org> Subject: [PATCH 0/4] arm64: MTE swap and hibernation support Date: Wed, 22 Apr 2020 15:25:26 +0100 [thread overview] Message-ID: <20200422142530.32619-1-steven.price@arm.com> (raw) 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/20200421142603.3894-1-catalin.marinas@arm.com/ 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 -- 2.20.1
next reply other threads:[~2020-04-22 14:25 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-22 14:25 Steven Price [this message] 2020-04-22 14:25 ` [PATCH 1/4] mm: Add PG_ARCH_2 page flag Steven Price 2020-04-22 14:25 ` [PATCH 2/4] mm: Add arch hooks for saving/restoring tags Steven Price 2020-04-22 18:08 ` Dave Hansen 2020-04-23 9:09 ` Catalin Marinas 2020-04-23 12:37 ` Steven Price 2020-04-22 14:25 ` [PATCH 3/4] arm64: mte: Enable swap of tagged pages Steven Price 2020-04-22 18:34 ` Dave Hansen 2020-04-23 13:51 ` Steven Price 2020-05-03 15:29 ` Catalin Marinas 2020-05-04 12:53 ` Steven Price 2020-04-22 14:25 ` [PATCH 4/4] arm64: mte: Save tags when hibernating Steven Price
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200422142530.32619-1-steven.price@arm.com \ --to=steven.price@arm.com \ --cc=akpm@linux-foundation.org \ --cc=arnd@arndb.de \ --cc=catalin.marinas@arm.com \ --cc=hughd@google.com \ --cc=linux-arch@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-mm@kvack.org \ --cc=vincenzo.frascino@arm.com \ --cc=will@kernel.org \ --subject='Re: [PATCH 0/4] arm64: MTE swap and hibernation support' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).