linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Anton Blanchard <anton@samba.org>
Cc: mikey@neuling.org, miltonm@bga.com, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] powerpc: Use more accurate limit for first segment memory allocations
Date: Tue, 11 May 2010 23:24:50 +1000	[thread overview]
Message-ID: <1273584290.2030.5.camel@concordia> (raw)
In-Reply-To: <20100511045918.GA13509@kryten>

[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]

On Tue, 2010-05-11 at 14:59 +1000, Anton Blanchard wrote:
> Author: Milton Miller <miltonm@bga.com>
> 
> On large machines we are running out of room below 256MB. In some cases we
> only need to ensure the allocation is in the first segment, which may be
> 256MB or 1TB.
> 
> Add slb0_limit and use it to specify the upper limit for the irqstack and
> emergency stacks.
> 
> On a large ppc64 box, this fixes a panic at boot when the crashkernel=
> option is specified (previously we would run out of memory below 256MB).
> 
> Signed-off-by: Milton Miller <miltonm@bga.com>
> Signed-off-by: Anton Blanchard <anton@samba.org>
> ---
> 
> Some things we should add:
> 
> - Specify a more intelligent limit for BookE
> - The allocation of the PACAs should use this limit too

We access the PACA from real mode?

> Index: linux-2.6/arch/powerpc/kernel/setup_64.c
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/kernel/setup_64.c	2010-04-22 17:23:42.000000000 +1000
> +++ linux-2.6/arch/powerpc/kernel/setup_64.c	2010-04-30 09:46:15.000000000 +1000
> @@ -424,9 +424,18 @@ void __init setup_system(void)
>  	DBG(" <- setup_system()\n");
>  }
>  
> +static u64 slb0_limit(void)
> +{
> +	if (cpu_has_feature(CPU_FTR_1T_SEGMENT)) {
> +		return 1UL << SID_SHIFT_1T;
> +	}
> +	return 1UL << SID_SHIFT;
> +}

I take it there's no chance the CPU feature is there but we're using 256
for whatever reason?

cheers


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

      reply	other threads:[~2010-05-11 13:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-11  4:59 [PATCH] powerpc: Use more accurate limit for first segment memory allocations Anton Blanchard
2010-05-11 13:24 ` Michael Ellerman [this message]

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=1273584290.2030.5.camel@concordia \
    --to=michael@ellerman.id.au \
    --cc=anton@samba.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mikey@neuling.org \
    --cc=miltonm@bga.com \
    /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).