Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Cliff Wickman <cpw@sgi.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: kexec@lists.infradead.org
Subject: Re: 896MB address limit
Date: Thu, 27 Sep 2012 18:07:12 -0500	[thread overview]
Message-ID: <20120927230712.GA32673@sgi.com> (raw)
In-Reply-To: <871uhqnnoz.fsf@xmission.com>

On Tue, Sep 25, 2012 at 08:10:04AM -0700, Eric W. Biederman wrote:
> Cliff Wickman <cpw@sgi.com> writes:
> 
> > Hi Eric, and all,
> >
> > On Mon, Sep 24, 2012 at 08:11:12PM -0700, Eric W. Biederman wrote:
> >> Cliff Wickman <cpw@sgi.com> writes:
> >> 
> >> > Gentlemen,
> >> >
> >> > In dumping very large memories we are running up against the 896MB 
> >> > limit in SLES11SP2 (3.0.38 kernel).
> >> 
> >> Odd.  That limit should be the maximum address in memory to load the
> >> crash kernel.  Tha limit should have nothing to do with the dump process
> >> itself.
> >> 
> >> Are you saying you need more that 512MiB reserved for the crash kernel
> >> to be able to dump all of the memory in your system?
> >> 
> >> Eric
> >
> > As I noted to Eric privately, yes we need to bump up to crashkernel=1G
> > or more for some very large memories.
> >
> > As an experiment I bumped
> > +++ linux/arch/x86/kernel/setup.c
> > @@ -528,7 +528,7 @@ static inline unsigned long long get_tot
> >  #ifdef CONFIG_X86_32
> >  # define CRASH_KERNEL_ADDR_MAX (512 << 20)
> >  #else
> > -# define CRASH_KERNEL_ADDR_MAX (896 << 20)
> > +# define CRASH_KERNEL_ADDR_MAX (1700 << 20)
> >
> > And that seems to work.  i.e. I'm currently dumping a system where
> > crashkernel=1G and it seems to be working.
> >
> > Am I just living dangerously? 
> 
> So fundamentally this should work.  However there have been a lot of
> kinks and silly limitations in the x86 boot protocol.
> 
> So it used to be that the bootloader protocol variable ramdisk_max was
> set to 896M for 32bit kernels.  Because the ramdisk could not be located
> in high memory.
> 
> Looking today it appears that ramdisk_max has been upped to 4G.
> 
> I will let you look through the /sbin/kexec source code.
> 
> As for testing I would up the limit to 4G on x86_64 and see how far
> you get.
> 
> The practical question does the system still work with crashkernel=32M
> when you have raised the limit much higher. 
> 
> So I would test with crashkernel=1G@2G and see if that works.  If that
> works I figure that in practice all of the bugs are historical and we
> can forget them.  But a sweep through the /sbin/kexec code for the magic
> number 896 might not be out of order.
> 
> Eric

I did try setting the limit to 8G. The crashkernel did get loaded there
but it would not execute there.

It works fine on a UV to set the limit to 4G and use a
crashkernel=1280M.  We have a hole of almost 2G there.

The memory at 2G is already in use so I can't explicitly place it there.

The kernel patch looks like this:
Index: linux/arch/x86/kernel/setup.c
===================================================================
--- linux.orig/arch/x86/kernel/setup.c
+++ linux/arch/x86/kernel/setup.c
@@ -522,13 +522,12 @@ static inline unsigned long long get_tot
 /*
  * Keep the crash kernel below this limit.  On 32 bits earlier kernels
  * would limit the kernel to the low 512 MiB due to mapping
  * restrictions.
- * On 64 bits, kexec-tools currently limits us to 896 MiB; increase
  this
- * limit once kexec-tools are fixed.
+ * On 64 bits, the boot protocol limits us to 4G.
  */
 #ifdef CONFIG_X86_32
 # define CRASH_KERNEL_ADDR_MAX (512 << 20)
 #else
-# define CRASH_KERNEL_ADDR_MAX (896 << 20)
+# define CRASH_KERNEL_ADDR_MAX (1UL << 32)
 #endif

 static void __init reserve_crashkernel(void)

-Cliff
-- 
Cliff Wickman
SGI
cpw@sgi.com
(651) 683-3824

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  parent reply	other threads:[~2012-09-27 23:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-24 23:07 896MB address limit Cliff Wickman
2012-09-25  3:11 ` Eric W. Biederman
2012-09-25 14:18   ` Cliff Wickman
2012-09-25 15:10     ` Eric W. Biederman
2012-09-25 15:57       ` Maxim Uvarov
2012-09-25 15:58         ` Maxim Uvarov
2012-09-27 23:07       ` Cliff Wickman [this message]
2012-09-25 17:38   ` Vivek Goyal

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=20120927230712.GA32673@sgi.com \
    --to=cpw@sgi.com \
    --cc=ebiederm@xmission.com \
    --cc=kexec@lists.infradead.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