linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Morse <james.morse@arm.com>
To: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Cc: robh+dt@kernel.org, catalin.marinas@arm.com, hch@lst.de,
	ardb@kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, lorenzo.pieralisi@arm.com,
	will@kernel.org, jeremy.linton@arm.com,
	iommu@lists.linux-foundation.org,
	linux-rpi-kernel@lists.infradead.org, guohanjun@huawei.com,
	robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v6 1/7] arm64: mm: Move reserve_crashkernel() into mem_init()
Date: Thu, 19 Nov 2020 18:18:23 +0000	[thread overview]
Message-ID: <f15ad06d-faa8-65fc-6fc1-d5c77115b1f1@arm.com> (raw)
In-Reply-To: <88c69ac0c9d7e144c80cebc7e9f82b000828e7f5.camel@suse.de>

Hi,

(sorry for the late response)

On 06/11/2020 18:46, Nicolas Saenz Julienne wrote:
> On Thu, 2020-11-05 at 16:11 +0000, James Morse wrote:>> We also depend on this when skipping the checksum code in purgatory, which can be
>> exceedingly slow.
> 
> This one I don't fully understand, so I'll lazily assume the prerequisite is
> the same WRT how memory is mapped. :)

The aim is its never normally mapped by the kernel. This is so that if we can't get rid of
the secondary CPUs (e.g. they have IRQs masked), but they are busy scribbling all over
memory, we have a rough guarantee that they aren't scribbling over the kdump kernel.

We can skip the checksum in purgatory, as there is very little risk of the memory having
been corrupted.


> Ultimately there's also /sys/kernel/kexec_crash_size's handling. Same
> prerequisite.

Yeah, this lets you release PAGE_SIZEs back to the allocator, which means the
marked-invalid page tables we have hidden there need to be PAGE_SIZE mappings.


Thanks,

James


> Keeping in mind acpi_table_upgrade() and unflatten_device_tree() depend on
> having the linear mappings available. I don't see any simple way of solving
> this. Both moving the firmware description routines to use fixmap or correcting
> the linear mapping further down the line so as to include kdump's regions, seem
> excessive/impossible (feel free to correct me here). I'd be happy to hear
> suggestions. Otherwise we're back to hard-coding the information as we
> initially did.
> 
> Let me stress that knowing the DMA constraints in the system before reserving
> crashkernel's regions is necessary if we ever want it to work seamlessly on all
> platforms. Be it small stuff like the Raspberry Pi or huge servers with TB of
> memory.

  parent reply	other threads:[~2020-11-19 18:19 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03 17:31 [PATCH v6 0/7] arm64: Default to 32-bit wide ZONE_DMA Nicolas Saenz Julienne
2020-11-03 17:31 ` [PATCH v6 1/7] arm64: mm: Move reserve_crashkernel() into mem_init() Nicolas Saenz Julienne
2020-11-05 16:11   ` James Morse
2020-11-06 18:46     ` Nicolas Saenz Julienne
2020-11-10 18:17       ` Catalin Marinas
2020-11-12 15:56         ` Nicolas Saenz Julienne
2020-11-13 11:29           ` Catalin Marinas
2020-11-19 14:09             ` Nicolas Saenz Julienne
2020-11-19 17:10               ` Catalin Marinas
2020-11-19 17:25                 ` Catalin Marinas
2020-11-19 17:25                 ` Nicolas Saenz Julienne
2020-11-19 17:45                   ` Catalin Marinas
2020-11-19 18:18       ` James Morse [this message]
2020-11-03 17:31 ` [PATCH v6 2/7] arm64: mm: Move zone_dma_bits initialization into zone_sizes_init() Nicolas Saenz Julienne
2020-11-03 17:31 ` [PATCH v6 3/7] of/address: Introduce of_dma_get_max_cpu_address() Nicolas Saenz Julienne
2020-11-03 17:31 ` [PATCH v6 4/7] of: unittest: Add test for of_dma_get_max_cpu_address() Nicolas Saenz Julienne
2020-11-03 17:31 ` [PATCH v6 5/7] arm64: mm: Set ZONE_DMA size based on devicetree's dma-ranges Nicolas Saenz Julienne
2020-11-03 17:31 ` [PATCH v6 6/7] arm64: mm: Set ZONE_DMA size based on early IORT scan Nicolas Saenz Julienne
2020-11-03 17:31 ` [PATCH v6 7/7] mm: Remove examples from enum zone_type comment Nicolas Saenz Julienne

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=f15ad06d-faa8-65fc-6fc1-d5c77115b1f1@arm.com \
    --to=james.morse@arm.com \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=guohanjun@huawei.com \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jeremy.linton@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=nsaenzjulienne@suse.de \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.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).