From: Mike Rapoport <rppt@kernel.org>
To: linux-arm-kernel@lists.infradead.org
Cc: Ard Biesheuvel <ardb@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Guanghui Feng <guanghuifeng@linux.alibaba.com>,
Mark Rutland <mark.rutland@arm.com>,
Mike Rapoport <rppt@kernel.org>,
Mike Rapoport <rppt@linux.ibm.com>, Will Deacon <will@kernel.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [RFC PATCH 0/4] arm64/mm: remap crash kernel with base pages even if rodata_full disabled
Date: Mon, 1 Aug 2022 11:04:14 +0300 [thread overview]
Message-ID: <20220801080418.120311-1-rppt@kernel.org> (raw)
From: Mike Rapoport <rppt@linux.ibm.com>
Hi,
There were several rounds of discussion how to remap with base pages only
the crash kernel area, the latest one here:
https://lore.kernel.org/all/1656777473-73887-1-git-send-email-guanghuifeng@linux.alibaba.com
and this is my attempt to allow having both large pages in the linear map
and protection for the crash kernel memory.
For server systems it is important to protect crash kernel memory for
post-mortem analysis, and for that protection to work the crash kernel
memory should be mapped with base pages in the linear map.
On the systems with ZONE_DMA/DMA32 enabled, crash kernel reservation
happens after the linear map is created and the current code forces using
base pages for the entire linear map, which results in performance
degradation.
These patches enable remapping of the crash kernel area with base pages
while keeping large pages in the rest of the linear map.
The idea is to align crash kernel reservation to PUD boundaries, remap that
PUD and then free the extra memory.
For now the remapping does not deal with the case when crash kernel base is
specified, but this won't be a problem to add if the idea is generally
acceptable.
Mike Rapoport (4):
arm64: introduce have_zone_dma() helper
arm64/mmu: drop _hotplug from unmap_hotplug_* function names
arm64/mmu: move helpers for hotplug page tables freeing close to callers
arm64/mm: remap crash kernel with base pages even if rodata_full disabled
arch/arm64/include/asm/memory.h | 8 +++
arch/arm64/include/asm/mmu.h | 2 +
arch/arm64/mm/init.c | 44 ++++++++++--
arch/arm64/mm/mmu.c | 116 ++++++++++++++++++++------------
4 files changed, 122 insertions(+), 48 deletions(-)
--
2.35.3
next reply other threads:[~2022-08-01 8:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 8:04 Mike Rapoport [this message]
2022-08-01 8:04 ` [RFC PATCH 1/4] arm64: introduce have_zone_dma() helper Mike Rapoport
2022-08-01 8:04 ` [RFC PATCH 2/4] arm64/mmu: drop _hotplug from unmap_hotplug_* function names Mike Rapoport
2022-08-01 8:04 ` [RFC PATCH 3/4] arm64/mmu: move helpers for hotplug page tables freeing close to callers Mike Rapoport
2022-08-01 8:04 ` [RFC PATCH 4/4] arm64/mm: remap crash kernel with base pages even if rodata_full disabled Mike Rapoport
2022-08-01 10:22 ` Ard Biesheuvel
2022-08-01 10:33 ` Mike Rapoport
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=20220801080418.120311-1-rppt@kernel.org \
--to=rppt@kernel.org \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=guanghuifeng@linux.alibaba.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mark.rutland@arm.com \
--cc=rppt@linux.ibm.com \
--cc=will@kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).