From: jbarnes@sgi.com (Jesse Barnes)
To: Andrew Morton <akpm@osdl.org>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>,
linux-kernel@vger.kernel.org, torvalds@osdl.org
Subject: Re: Bootmem broke ARM
Date: Mon, 17 Nov 2003 10:04:40 -0800 [thread overview]
Message-ID: <20031117180440.GA9711@sgi.com> (raw)
In-Reply-To: <20031116121131.0796cf01.akpm@osdl.org>
On Sun, Nov 16, 2003 at 12:11:31PM -0800, Andrew Morton wrote:
> Russell King <rmk+lkml@arm.linux.org.uk> wrote:
> > With previous kernels, the nodes are added to the list in reverse order,
> > so architecture code knew we had to add the highest PFN first and the
> > lowest PFN node last.
You're right, I think the arch code should probably worry about this.
> It looks to be bogus on ia64 as well, for which the patch was written.
Yep, I think it is bogus. There's only one caller on ia64 that would be
affected--swiotlb_init(), and afaik multi-node systems won't be using
that code (except maybe NEC?), so even if the pgdat list is out of order
we should be ok. If not I'll fix the ia64 discontig code.
Thanks,
Jesse
===== mm/bootmem.c 1.22 vs edited =====
--- 1.22/mm/bootmem.c Sun Sep 28 10:11:27 2003
+++ edited/mm/bootmem.c Mon Nov 17 10:44:59 2003
@@ -48,24 +48,8 @@
bootmem_data_t *bdata = pgdat->bdata;
unsigned long mapsize = ((end - start)+7)/8;
-
- /*
- * sort pgdat_list so that the lowest one comes first,
- * which makes alloc_bootmem_low_pages work as desired.
- */
- if (!pgdat_list || pgdat_list->node_start_pfn > pgdat->node_start_pfn) {
- pgdat->pgdat_next = pgdat_list;
- pgdat_list = pgdat;
- } else {
- pg_data_t *tmp = pgdat_list;
- while (tmp->pgdat_next) {
- if (tmp->pgdat_next->node_start_pfn > pgdat->node_start_pfn)
- break;
- tmp = tmp->pgdat_next;
- }
- pgdat->pgdat_next = tmp->pgdat_next;
- tmp->pgdat_next = pgdat;
- }
+ pgdat->pgdat_next = pgdat_list;
+ pgdat_list = pgdat;
mapsize = (mapsize + (sizeof(long) - 1UL)) & ~(sizeof(long) - 1UL);
bdata->node_bootmem_map = phys_to_virt(mapstart << PAGE_SHIFT);
next prev parent reply other threads:[~2003-11-17 18:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-16 10:15 Bootmem broke ARM Russell King
2003-11-16 20:11 ` Andrew Morton
2003-11-17 18:04 ` Jesse Barnes [this message]
2003-11-18 9:42 ` Russell King
2003-11-18 9:57 ` Russell King
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=20031117180440.GA9711@sgi.com \
--to=jbarnes@sgi.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+lkml@arm.linux.org.uk \
--cc=torvalds@osdl.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