[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ve1qcn6n.fsf@saeurebad.de>
Date: Wed, 07 May 2008 14:29:20 +0200
From: Johannes Weiner <hannes@...urebad.de>
To: linux-kernel@...r.kernel.org
Cc: linux-mm@...ck.org, Ingo Molnar <mingo@...e.hu>,
Andi Kleen <andi@...stfloor.org>,
Yinghai Lu <yhlu.kernel@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Yasunori Goto <y-goto@...fujitsu.com>
Subject: [RFC no patch yet] bootmem2: Another try
Hi,
my idea is now as follows:
Bootmem2 is block-oriented where a block represents a contiguous range
of physical memory. Every block has a bitmap that keeps track of the
pages on it.
On top of this block interface, bootmem2 implements the node model
where a node can provide one or more memory blocks.
On configurations with multiple blocks per node, the arch code has to
register each block on its own.
free_bootmem and reserve_bootmem require that the requested range is
contiguous but they might go across node boundaries (two blocks on two
nodes can be contiguous). For example:
node 0: block 0 = 0-2G, block 1 = 4-6G
node 1: block 2 = 2-4G, block 3 = 6-8G
free_bootmem(1.5G, 3G) is valid here, the range spans two nodes and two
blocks but is contiguous.
free_bootmem_node and reserve_bootmem_node are more strict, the ranges
have to be completely within one block of the specified node (two
blocks on one node are never contiguous).
alloc_bootmem_node tries to get memory between goal and limit from a
specific node and falls back to any free memory range on that node on
failure.
alloc_bootmem tries to get memory from between goal and limit and
falls back to any free memory range in the system on failure.
What do you say?
Hannes
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists