From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org,
x86@kernel.org, linux-mm@kvack.org
Cc: boris.ostrovsky@oracle.com, sstabellini@kernel.org,
hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, Juergen Gross <jgross@suse.com>
Subject: [PATCH 0/2] x86: respect memory size limits
Date: Tue, 22 Jan 2019 09:06:26 +0100 [thread overview]
Message-ID: <20190122080628.7238-1-jgross@suse.com> (raw)
On a customer system running Xen a boot problem was observed due to
the kernel not respecting the memory size limit imposed by the Xen
hypervisor.
During analysis I found the same problem should be able to occur on
bare metal in case the memory would be limited via the "mem=" boot
parameter.
The system this problem has been observed on has tons of memory
added via PCI. So while in the E820 map the not to be used memory has
been wiped out the additional PCI memory is detected during ACPI scan
and it is added via __add_memory().
This small series tries to repair the issue by testing the imposed
memory limit during the memory hotplug process and refusing to add it
in case the limit is being violated.
I've chosen to refuse adding the complete memory chunk in case the
limit is reached instead of adding only some of the memory, as I
thought this would result in less problems (e.g. avoiding to add
only parts of a 128MB memory bar which might be difficult to remove
later).
Juergen Gross (2):
x86: respect memory size limiting via mem= parameter
x86/xen: dont add memory above max allowed allocation
arch/x86/kernel/e820.c | 5 +++++
arch/x86/xen/setup.c | 5 +++++
include/linux/memory_hotplug.h | 2 ++
mm/memory_hotplug.c | 6 ++++++
4 files changed, 18 insertions(+)
--
2.16.4
next reply other threads:[~2019-01-22 8:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-22 8:06 Juergen Gross [this message]
2019-01-22 8:06 ` [PATCH 1/2] x86: respect memory size limiting via mem= parameter Juergen Gross
2019-01-23 14:35 ` William Kucharski
2019-01-23 14:39 ` Juergen Gross
2019-01-22 8:06 ` [PATCH 2/2] x86/xen: dont add memory above max allowed allocation Juergen Gross
2019-01-22 8:52 ` [Xen-devel] " Jan Beulich
2019-01-22 8:52 ` Jan Beulich
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=20190122080628.7238-1-jgross@suse.com \
--to=jgross@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=sstabellini@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.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).