mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: Conny Seidel <conny.seidel@amd.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	Hans Rosenfeld <hans.rosenfeld@amd.com>
Subject: Re: [PATCH x86/urgent 2/2] x86: Implement pfn -> nid mapping granularity check
Date: Sat, 9 Jul 2011 10:32:06 +0200	[thread overview]
Message-ID: <20110709083206.GB943@htj.dyndns.org> (raw)
In-Reply-To: <20110701162327.GY3386@htj.dyndns.org>

On Fri, Jul 01, 2011 at 06:23:27PM +0200, Tejun Heo wrote:
> Both SPARSEMEM and DISCONTIGMEM have limited granularity when mapping
> pfn to nid.  If NUMA nodes are laid out such that the mapping cannot
> be accurate, boot will fail triggering BUG_ON() in
> mminit_verify_page_links().
> 
> On 32bit, it's 512MiB w/ PAE and SPARSEMEM.  This seems to have been
> granular enough until commit 2706a0bf7b (x86, NUMA: Enable
> CONFIG_AMD_NUMA on 32bit too).  Apparently, there is a machine which
> aligns NUMA nodes to 128MiB and has only AMD NUMA but not SRAT.  As
> x86_64 has granularity of 128MiB, NUMA config worked fine on the
> machine; however, the commit enabled AMD NUMA config on 32bit too and
> the 512MiB granularity wasn't enough.
> 
>  On node 0 totalpages: 2096615
>    DMA zone: 32 pages used for memmap
>    DMA zone: 0 pages reserved
>    DMA zone: 3927 pages, LIFO batch:0
>    Normal zone: 1740 pages used for memmap
>    Normal zone: 220978 pages, LIFO batch:31
>    HighMem zone: 16405 pages used for memmap
>    HighMem zone: 1853533 pages, LIFO batch:31
>  BUG: Int 6: CR2   (null)
>       EDI   (null)  ESI 00000002  EBP 00000002  ESP c1543ecc
>       EBX f2400000  EDX 00000006  ECX   (null)  EAX 00000001
>       err   (null)  EIP c16209aa   CS 00000060  flg 00010002
>  Stack: f2400000 00220000 f7200800 c1620613 00220000 01000000 04400000 00238000
>           (null) f7200000 00000002 f7200b58 f7200800 c1620929 000375fe   (null)
>         f7200b80 c16395f0 00200a02 f7200a80   (null) 000375fe 00000002   (null)
>  Pid: 0, comm: swapper Not tainted 2.6.39-rc5-00181-g2706a0b #17
>  Call Trace:
>   [<c136b1e5>] ? early_fault+0x2e/0x2e
>   [<c16209aa>] ? mminit_verify_page_links+0x12/0x42
>   [<c1620613>] ? memmap_init_zone+0xaf/0x10c
>   [<c1620929>] ? free_area_init_node+0x2b9/0x2e3
>   [<c1607e99>] ? free_area_init_nodes+0x3f2/0x451
>   [<c1601d80>] ? paging_init+0x112/0x118
>   [<c15f578d>] ? setup_arch+0x791/0x82f
>   [<c15f43d9>] ? start_kernel+0x6a/0x257
> 
> This patch implements node_map_pfn_alignment() which determines
> maximum internode alignment and update numa_register_memblks() to
> reject NUMA configuration if alignment exceeds the pfn -> nid mapping
> granularity of the memory model as determined by PAGES_PER_SECTION.
> 
> This makes the problematic machine boot w/ flatmem by rejecting the
> NUMA config and provides protection against crazy NUMA configurations.
> 
> Signed-off-by: Tejun Heo <tj@kernel.org>
> LKML-Reference: <20110628174613.GP478@escobedo.osrc.amd.com>
> Reported-and-Tested-by: Hans Rosenfeld <hans.rosenfeld@amd.com>
> Cc: Conny Seidel <conny.seidel@amd.com>

Ping?  If the change is too invasive at this stage, we can disable AMD
NUMA on x86_32 for 3.0 and queue these two for 3.1.

Thanks.

-- 
tejun

  reply	other threads:[~2011-07-09  8:32 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-21 15:41 32bit NUMA and fakeNUMA broken for AMD CPUs Conny Seidel
2011-06-26 10:22 ` Tejun Heo
     [not found]   ` <20110626223807.47cef5c6.conny.seidel_amd.com@marah.osrc.amd.com>
2011-06-28  9:41     ` [PATCH tip:x86/urgent] x86-32, NUMA: Fix boot regression caused by NUMA init unification on highmem machines Tejun Heo
2011-06-28 12:35       ` Conny Seidel
2011-07-01 15:26       ` [tip:x86/urgent] " tip-bot for Tejun Heo
     [not found]     ` <20110628174613.GP478@escobedo.osrc.amd.com>
2011-06-29  9:44       ` 32bit NUMA and fakeNUMA broken for AMD CPUs Tejun Heo
2011-06-29 10:51         ` Tejun Heo
2011-06-29 12:34         ` Tejun Heo
2011-06-29 12:55           ` Hans Rosenfeld
2011-06-29 13:03             ` Tejun Heo
2011-06-29 16:15               ` Tejun Heo
2011-06-30 13:13                 ` Hans Rosenfeld
2011-06-30 15:55                   ` Tejun Heo
2011-06-30 16:32                     ` Hans Rosenfeld
2011-06-30 16:42                       ` Tejun Heo
2011-06-30 17:04                         ` Hans Rosenfeld
2011-07-01 16:22         ` [PATCH x86/urgent 1/2] x86: s/PAGES_PER_ELEMENT/PAGES_PER_SECTION/ Tejun Heo
2011-07-01 16:23           ` [PATCH x86/urgent 2/2] x86: Implement pfn -> nid mapping granularity check Tejun Heo
2011-07-09  8:32             ` Tejun Heo [this message]
2011-07-09  8:42               ` H. Peter Anvin
2011-07-11  8:34                 ` [PATCH x86/urgent] x86: Disable AMD_NUMA for 32bit for now Tejun Heo
2011-07-11 14:01                   ` Tejun Heo
2011-07-11 18:58                   ` [tip:x86/urgent] " tip-bot for Tejun Heo
2011-07-11 14:20                 ` [PATCH x86/urgent 2/2] x86: Implement pfn -> nid mapping granularity check Hans Rosenfeld
2011-07-13  5:34       ` [tip:x86/numa] x86, numa: " tip-bot for Tejun Heo
2011-07-12  7:44 [PATCH x86/mm 1/2] x86: s/PAGES_PER_ELEMENT/PAGES_PER_SECTION/ Tejun Heo
2011-07-12  7:45 ` [PATCH x86/mm 2/2] x86: Implement pfn -> nid mapping granularity check Tejun Heo
2011-07-13  5:33 ` [tip:x86/numa] x86, mm: s/PAGES_PER_ELEMENT/PAGES_PER_SECTION/ tip-bot for Tejun Heo

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=20110709083206.GB943@htj.dyndns.org \
    --to=tj@kernel.org \
    --cc=conny.seidel@amd.com \
    --cc=hans.rosenfeld@amd.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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

all inboxes | Powered by JetHome®