|
From: Johannes Weiner on 7 May 2008 08:30 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(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|
Pages: 1 Prev: unprivileged mounts git tree Next: [PATCH 0/3] [2.6.26] ehea: Add DLPAR memory remove support |