From: "H. Peter Anvin" <hpa@zytor.com>
To: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] rip out x86_32 NUMA remapping code
Date: Thu, 31 Jan 2013 13:51:31 -0800 [thread overview]
Message-ID: <510AE763.6090907@zytor.com> (raw)
In-Reply-To: <20130131005616.1C79F411@kernel.stglabs.ibm.com>
On 01/30/2013 04:56 PM, Dave Hansen wrote:
> This code was an optimization for 32-bit NUMA systems.
>
> It has probably been the cause of a number of subtle bugs over
> the years, although the conditions to excite them would have
> been hard to trigger. Essentially, we remap part of the kernel
> linear mapping area, and then sometimes part of that area gets
> freed back in to the bootmem allocator. If those pages get
> used by kernel data structures (say mem_map[] or a dentry),
> there's no big deal. But, if anyone ever tried to use the
> linear mapping for these pages _and_ cared about their physical
> address, bad things happen.
>
> For instance, say you passed __GFP_ZERO to the page allocator
> and then happened to get handed one of these pages, it zero the
> remapped page, but it would make a pte to the _old_ page.
> There are probably a hundred other ways that it could screw
> with things.
>
> We don't need to hang on to performance optimizations for
> these old boxes any more. All my 32-bit NUMA systems are long
> dead and buried, and I probably had access to more than most
> people.
>
> This code is causing real things to break today:
>
> https://lkml.org/lkml/2013/1/9/376
>
> I looked in to actually fixing this, but it requires surgery
> to way too much brittle code, as well as stuff like
> per_cpu_ptr_to_phys().
>
I get a build failure on i386 allyesconfig with this patch:
arch/x86/power/built-in.o: In function `swsusp_arch_resume':
(.text+0x14e4): undefined reference to `resume_map_numa_kva'
It looks trivial to fix up; I assume resume_map_numa_kva() just goes
away like it does in the non-NUMA case, but it would be nice if you
could confirm that.
-hpa
next prev parent reply other threads:[~2013-01-31 21:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-31 0:56 [RFC][PATCH] rip out x86_32 NUMA remapping code Dave Hansen
2013-01-31 21:24 ` H. Peter Anvin
2013-01-31 21:51 ` H. Peter Anvin [this message]
2013-01-31 21:55 ` Yinghai Lu
2013-01-31 21:59 ` H. Peter Anvin
2013-01-31 22:01 ` Yinghai Lu
2013-01-31 22:03 ` H. Peter Anvin
2013-01-31 22:09 ` Dave Hansen
2013-01-31 22:12 ` H. Peter Anvin
2013-01-31 22:41 ` [tip:x86/mm] x86-32, mm: Remove reference to alloc_remap() tip-bot for H. Peter Anvin
2013-01-31 22:39 ` [tip:x86/mm] x86-32, mm: Rip out x86_32 NUMA remapping code tip-bot for Dave Hansen
2013-01-31 22:40 ` [tip:x86/mm] x86-32, mm: Remove reference to resume_map_numa_kva( ) tip-bot for H. Peter Anvin
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=510AE763.6090907@zytor.com \
--to=hpa@zytor.com \
--cc=dave@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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;
as well as URLs for NNTP newsgroup(s).