login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
July
»
14
Re: [PATCH] x86: Find offset for crashkernel reservation automatically
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Yinghai Lu
Subject:
Re: [PATCH] x86: Find offset for crashkernel reservation automatically
Date: Monday, July 14, 2008 - 12:11 am
On Fri, Jun 27, 2008 at 6:32 AM, Vivek Goyal <vgoyal@redhat.com> wrote:
quoted text
> On Thu, Jun 26, 2008 at 09:54:08PM +0200, Bernhard Walle wrote: >> This patch removes the need of the crashkernel=...@offset parameter to define >> a fixed offset for crashkernel reservation. That feature can be used together >> with a relocatable kernel where the kexec-tools relocate the kernel and >> get the actual offset from /proc/iomem. >> >> The use case is a kernel where the .text+.data+.bss is after 16M physical >> memory (debug kernel with lockdep on x86_64 can cause that) which caused a >> major pain in autoconfiguration in our distribution. >> >> Also, that patch unifies crashdump architectures a bit since IA64 has >> that semantics from the very beginning of the kdump port. >> >> Please provide feedback! >> > > Hi Bernhard, > > This looks like a good idea. That means distributions don't have to > hardcode the crashbase at 16MB and the decision to find a free memory > can be left on kernel. Users will also find it easy that way. > >> >> Signed-off-by: Bernhard Walle <bwalle@suse.de> >> --- >> arch/x86/kernel/setup.c | 70 +++++++++++++++++++++++++++++++++++------------ >> 1 files changed, 52 insertions(+), 18 deletions(-) >> >> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c >> index a81d82c..c30bb7b 100644 >> --- a/arch/x86/kernel/setup.c >> +++ b/arch/x86/kernel/setup.c >> @@ -435,6 +435,34 @@ static inline unsigned long long get_total_mem(void) >> } >> >> #ifdef CONFIG_KEXEC >> + >> +/** >> + * Reserve @size bytes of crashkernel memory at any suitable offset. >> + * >> + * @size: Size of the crashkernel memory to reserve. >> + * Returns the base address on success, and -1ULL on failure. >> + */ >> +unsigned long long find_and_reserve_crashkernel(unsigned long long size) >> +{ >> + const unsigned long long alignment = 16<<20; /* 16M */ >> + unsigned long long start = 0LL; >> + >> + while (1) { >> + int ret; >> + >> + start = find_e820_area(start, ULONG_MAX, size, alignment);
should use min_t(u64, 1ULL<<32, max_low_pfn<<PAGE_SHIFT) replace ULONG_MAX YH --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] x86: Find offset for crashkernel reservation autom ...
, Bernhard Walle
, (Thu Jun 26, 12:54 pm)
Re: [PATCH] x86: Find offset for crashkernel reservation a ...
, Vivek Goyal
, (Fri Jun 27, 6:32 am)
Re: [PATCH] x86: Find offset for crashkernel reservation a ...
, Vivek Goyal
, (Fri Jun 27, 6:42 am)
Re: [PATCH] x86: Find offset for crashkernel reservation a ...
, Bernhard Walle
, (Fri Jun 27, 7:06 am)
Re: [PATCH] x86: Find offset for crashkernel reservation a ...
, Vivek Goyal
, (Fri Jun 27, 7:19 am)
Re: [PATCH] x86: Find offset for crashkernel reservation a ...
, Bernhard Walle
, (Fri Jun 27, 7:22 am)
Re: [PATCH] x86: Find offset for crashkernel reservation a ...
, Eric W. Biederman
, (Fri Jun 27, 11:00 am)
Re: [PATCH] x86: Find offset for crashkernel reservation a ...
, Bernhard Walle
, (Fri Jun 27, 11:29 am)
Re: [PATCH] x86: Find offset for crashkernel reservation a ...
, Ingo Molnar
, (Thu Jul 3, 6:14 am)
Re: [PATCH] x86: Find offset for crashkernel reservation a ...
, Yinghai Lu
, (Mon Jul 14, 12:11 am)
Re: [PATCH] x86: Find offset for crashkernel reservation a ...
, Bernhard Walle
, (Mon Jul 14, 2:24 am)
Re: [PATCH] x86: Find offset for crashkernel reservation a ...
, Eric W. Biederman
, (Mon Jul 14, 2:44 am)
Re: [PATCH] x86: Find offset for crashkernel reservation a ...
, Yinghai Lu
, (Mon Jul 14, 10:06 am)
Re: [PATCH] x86: Find offset for crashkernel reservation a ...
, Eric W. Biederman
, (Mon Jul 14, 10:30 am)
Re: [PATCH] x86: Find offset for crashkernel reservation a ...
, Yinghai Lu
, (Mon Jul 14, 11:17 am)
Re: [PATCH] x86: Find offset for crashkernel reservation a ...
, Eric W. Biederman
, (Mon Jul 14, 11:41 am)
Re: [PATCH] x86: Find offset for crashkernel reservation a ...
, Bernhard Walle
, (Mon Jul 14, 11:47 am)
Re: [PATCH] x86: Find offset for crashkernel reservation a ...
, Eric W. Biederman
, (Mon Jul 14, 11:55 am)
Re: [PATCH] x86: Find offset for crashkernel reservation a ...
, Yinghai Lu
, (Mon Jul 14, 12:08 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 041/196] kobject: add kobject_init_and_add function
Lukas Hejtmanek
Re: Another libata error related to OCZ SSD
Greg Kroah-Hartman
[PATCH 023/196] MCP_UCB1200: Convert from class_device to device
Florian Fainelli
Re: System clock runs too fast after 2.6.27 -> 2.6.28.1 upgrade
Christoph Lameter
[patch 1/4] mmu_notifier: Core code
git
:
Johannes Schindelin
Re: [PATCH 1/2] Add strbuf_initf()
John Bito
[EGIT] Push to GitHub caused corruption
Jakub Narebski
Re: [PATCH 0/2] gitweb: patch view
Junio C Hamano
Re: [PATCH] When a remote is added but not fetched, tell the user.
Andy Parkins
Re: [RFC] Submodules in GIT
git-commits-head
:
Linux Kernel Mailing List
ahci: Workaround HW bug for SB600/700 SATA controller PMP support
Linux Kernel Mailing List
V4L/DVB (11086): au0828: rename macro for currently non-function VBI support
Linux Kernel Mailing List
ceph: client types
Linux Kernel Mailing List
ceph: on-wire types
Linux Kernel Mailing List
crypto: chainiv - Use kcrypto_wq instead of keventd_wq
linux-netdev
:
Andrew Morton
Re: [Bugme-new] [Bug 14969] New: b44: WOL does not work in suspended state
Giuseppe CAVALLARO
Re: [PATCH 03/13] stmmac: add the new Header file for stmmac platform data
Taku Izumi
[PATCH 3/3] ixgbe: add registers etc. printout code just before resetting adapters
Eric Dumazet
rps: some comments
Thomas Gleixner
Re: [RFC PATCH 02/12] On Tue, 23 Sep 2008, David Miller wrote:
openbsd-misc
:
Stephan Andreas
problems with login after xlock in OpenBSD release 4.7
pmc
Make A Change. Alcoholism and Drug Addiction Treatment
ropers
Re: what exactly is enc0?
Fuad NAHDI
Re: What does your environment look like?
Matthew Szudzik
Typo on OpenBSD 4.4 CD Set
Colocation donated by:
Syndicate