From: Johannes Weiner <hannes@saeurebad.de>
To: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Cc: Ingo Molnar <mingo@elte.hu>, Andi Kleen <andi@firstfloor.org>,
Yinghai Lu <yhlu.kernel@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Yasunori Goto <y-goto@jp.fujitsu.com>
Subject: [rfc][patch 3/3] x86: Use bootmem2 on x86_32
Date: Mon, 05 May 2008 11:59:41 +0200 [thread overview]
Message-ID: <20080505100846.804585724@symbol.fehenstaub.lan> (raw)
In-Reply-To: <20080505095938.326928514@symbol.fehenstaub.lan>
[-- Attachment #1: bootmem2-migrate-x86_32.patch --]
[-- Type: text/plain, Size: 1775 bytes --]
Straight-forward migration to use bootmem2 on the author's computer.
Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
---
Index: linux-2.6/arch/x86/kernel/setup_32.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/setup_32.c
+++ linux-2.6/arch/x86/kernel/setup_32.c
@@ -641,7 +641,9 @@ void __init setup_bootmem_allocator(void
/*
* Initialize the boot-time allocator (with low memory only):
*/
- bootmap_size = init_bootmem(min_low_pfn, max_low_pfn);
+ bootmem_register(0, max_low_pfn);
+ bootmap_size = bootmem_map_pages() << PAGE_SHIFT;
+ bootmem_setup(min_low_pfn);
register_bootmem_low_pages(max_low_pfn);
Index: linux-2.6/arch/x86/mm/init_32.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/init_32.c
+++ linux-2.6/arch/x86/mm/init_32.c
@@ -585,7 +585,7 @@ void __init mem_init(void)
}
#endif
/* this will put all low memory onto the freelists */
- totalram_pages += free_all_bootmem();
+ totalram_pages += bootmem_release();
reservedpages = 0;
for (tmp = 0; tmp < max_low_pfn; tmp++)
Index: linux-2.6/arch/x86/Kconfig
===================================================================
--- linux-2.6.orig/arch/x86/Kconfig
+++ linux-2.6/arch/x86/Kconfig
@@ -24,6 +24,7 @@ config X86
select HAVE_KRETPROBES
select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64)
select HAVE_ARCH_KGDB if !X86_VOYAGER
+ select HAVE_BOOTMEM2 if X86_32
config DEFCONFIG_LIST
string
--
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-05-05 9:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-05 9:59 [rfc][patch 0/3] bootmem2: a memory block-oriented boot time allocator Johannes Weiner
2008-05-05 9:59 ` [rfc][patch 1/3] mm: Define NR_NODE_MEMBLKS unconditionally Johannes Weiner
2008-05-05 9:59 ` [rfc][patch 2/3] mm: bootmem2 - memory block oriented boot time allocator Johannes Weiner
2008-05-05 9:59 ` Johannes Weiner [this message]
2008-05-05 11:23 ` [rfc][patch 0/3] bootmem2: a memory block-oriented " Johannes Weiner
2008-05-05 15:23 ` Linus Torvalds
2008-05-05 16:04 ` Robin Holt
2008-05-06 9:00 ` Johannes Weiner
2008-05-05 18:58 ` Andi Kleen
2008-05-06 8:57 ` Johannes Weiner
2008-05-07 12:29 ` [RFC no patch yet] bootmem2: Another try Johannes Weiner
2008-05-07 14:37 ` Linus Torvalds
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=20080505100846.804585724@symbol.fehenstaub.lan \
--to=hannes@saeurebad.de \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
--cc=torvalds@linux-foundation.org \
--cc=y-goto@jp.fujitsu.com \
--cc=yhlu.kernel@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