linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Yinghai Lu <yinghai@kernel.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	yinghai@kernel.org, a.p.zijlstra@chello.nl,
	torvalds@linux-foundation.org, holt@sgi.com,
	xiyou.wangcong@gmail.com, akpm@linux-foundation.org,
	tglx@linutronix.de
Subject: [tip:x86/urgent] x86/mm: Only add extra pages count for the first memory range during pre-allocation early page table space
Date: Fri, 8 Jun 2012 07:48:26 -0700	[thread overview]
Message-ID: <tip-bd2753b2dda7bb43c7468826de75f49c6a7e8965@git.kernel.org> (raw)
In-Reply-To: <CAE9FiQUj3wyzQxtq9yzBNc9u220p8JZ1FYHG7t=MOzJ=9BZMYA@mail.gmail.com>

Commit-ID:  bd2753b2dda7bb43c7468826de75f49c6a7e8965
Gitweb:     http://git.kernel.org/tip/bd2753b2dda7bb43c7468826de75f49c6a7e8965
Author:     Yinghai Lu <yinghai@kernel.org>
AuthorDate: Wed, 6 Jun 2012 10:55:40 -0700
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 8 Jun 2012 11:40:50 +0200

x86/mm: Only add extra pages count for the first memory range during pre-allocation early page table space

Robin found this regression:

| I just tried to boot an 8TB system.  It fails very early in boot with:
| Kernel panic - not syncing: Cannot find space for the kernel page tables

git bisect commit 722bc6b16771ed80871e1fd81c86d3627dda2ac8.

A git revert of that commit does boot past that point on the 8TB
configuration.

That commit will add up extra pages for all memory range even
above 4g.

Try to limit that extra page count adding to first entry only.

Bisected-by: Robin Holt <holt@sgi.com>
Tested-by: Robin Holt <holt@sgi.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/CAE9FiQUj3wyzQxtq9yzBNc9u220p8JZ1FYHG7t%3DMOzJ%3D9BZMYA@mail.gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/mm/init.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 97141c2..bc4e9d8 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -62,7 +62,8 @@ static void __init find_early_table_space(struct map_range *mr, unsigned long en
 		extra += PMD_SIZE;
 #endif
 		/* The first 2/4M doesn't use large pages. */
-		extra += mr->end - mr->start;
+		if (mr->start < PMD_SIZE)
+			extra += mr->end - mr->start;
 
 		ptes = (extra + PAGE_SIZE - 1) >> PAGE_SHIFT;
 	} else

      parent reply	other threads:[~2012-06-08 14:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-01 15:54 Commit 722bc6b167 breaks booting on an 8TB system Robin Holt
2012-06-02 14:24 ` Ethan.kernel@gmail
2012-06-03  7:00 ` Yinghai Lu
2012-06-04 10:07   ` Robin Holt
2012-06-04 23:51     ` Yinghai Lu
2012-06-06  9:42       ` Robin Holt
2012-06-06  9:48         ` Robin Holt
2012-06-06  9:51           ` Ingo Molnar
2012-06-06 10:46             ` Robin Holt
2012-06-06 17:55             ` Yinghai Lu
2012-06-06 18:54               ` Robin Holt
2012-06-08 14:48               ` tip-bot for Yinghai Lu [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=tip-bd2753b2dda7bb43c7468826de75f49c6a7e8965@git.kernel.org \
    --to=yinghai@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=holt@sgi.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=xiyou.wangcong@gmail.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).