From: Tony Luck <tony.luck@gmail.com>
To: Laura Abbott <labbott@fedoraproject.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Vlastimil Babka <vbabka@suse.cz>,
Bjorn Andersson <bjorn.andersson@sonymobile.com>,
Laura Abbott <laura@labbott.name>,
Santosh Shilimkar <ssantosh@kernel.org>,
Russell King <rmk@arm.linux.org.uk>,
Kevin Hilman <khilman@linaro.org>, Arnd Bergman <arnd@arndb.de>,
Stephen Boyd <sboyd@codeaurora.org>,
Andy Gross <agross@codeaurora.org>, Mel Gorman <mgorman@suse.de>,
Steven Rostedt <rostedt@goodmis.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
Laura Abbott <lauraa@codeaurora.org>
Subject: Re: [PATCHv4] mm: Don't offset memmap for flatmem
Date: Mon, 9 Nov 2015 15:20:58 -0800 [thread overview]
Message-ID: <CA+8MBbLGdYfQRPnVmT=te1y3C7PhCcXqbDGXb7LtqvCWTA+vDQ@mail.gmail.com> (raw)
In-Reply-To: <1444253335-5811-1-git-send-email-labbott@fedoraproject.org>
[-- Attachment #1: Type: text/plain, Size: 866 bytes --]
> @@ -4984,9 +4987,9 @@ static void __init_refok alloc_node_mem_map(struct pglist_data *pgdat)
> */
> if (pgdat == NODE_DATA(0)) {
> mem_map = NODE_DATA(0)->node_mem_map;
> -#ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP
> +#if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM)
> if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
> - mem_map -= (pgdat->node_start_pfn - ARCH_PFN_OFFSET);
> + mem_map -= offset;
> #endif /* CONFIG_HAVE_MEMBLOCK_NODE_MAP */
> }
> #endif
This piece breaks ia64. See the comment earlier in the function
that "ia64 gets its own node_mem_map" ... so we skip the initialization
of offset ... and arrive down here and just subtract "0" from mem_map.
Attached patch fixes ia64 ... does ARM still work if this is applied?
-Tony
[-- Attachment #2: fixia64.patch --]
[-- Type: text/x-patch, Size: 1226 bytes --]
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 208e4c7e771b..c4705095a516 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5266,6 +5266,7 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat)
static void __init_refok alloc_node_mem_map(struct pglist_data *pgdat)
{
+ unsigned long __maybe_unused start = 0;
unsigned long __maybe_unused offset = 0;
/* Skip empty nodes */
@@ -5273,9 +5274,11 @@ static void __init_refok alloc_node_mem_map(struct pglist_data *pgdat)
return;
#ifdef CONFIG_FLAT_NODE_MEM_MAP
+ start = pgdat->node_start_pfn & ~(MAX_ORDER_NR_PAGES - 1);
+ offset = pgdat->node_start_pfn - start;
/* ia64 gets its own node_mem_map, before this, without bootmem */
if (!pgdat->node_mem_map) {
- unsigned long size, start, end;
+ unsigned long size, end;
struct page *map;
/*
@@ -5284,7 +5287,6 @@ static void __init_refok alloc_node_mem_map(struct pglist_data *pgdat)
* for the buddy allocator to function correctly.
*/
start = pgdat->node_start_pfn & ~(MAX_ORDER_NR_PAGES - 1);
- offset = pgdat->node_start_pfn - start;
end = pgdat_end_pfn(pgdat);
end = ALIGN(end, MAX_ORDER_NR_PAGES);
size = (end - start) * sizeof(struct page);
next prev parent reply other threads:[~2015-11-09 23:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 21:28 Laura Abbott
2015-10-14 12:54 ` Vlastimil Babka
2015-11-09 23:20 ` Tony Luck [this message]
2015-11-10 1:34 ` Laura Abbott
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='CA+8MBbLGdYfQRPnVmT=te1y3C7PhCcXqbDGXb7LtqvCWTA+vDQ@mail.gmail.com' \
--to=tony.luck@gmail.com \
--cc=agross@codeaurora.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=bjorn.andersson@sonymobile.com \
--cc=khilman@linaro.org \
--cc=labbott@fedoraproject.org \
--cc=laura@labbott.name \
--cc=lauraa@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=rmk@arm.linux.org.uk \
--cc=rostedt@goodmis.org \
--cc=sboyd@codeaurora.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=ssantosh@kernel.org \
--cc=vbabka@suse.cz \
/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