Re: [RFC] Reimplementation of linux dynamic percpu memory allocator
From: Ravikiran G Thirumalai
Date: Mon Dec 20 2004 - 14:11:53 EST
On Mon, Dec 20, 2004 at 07:24:07PM +0100, Manfred Spraul wrote:
> No, not fast path. But it can happen a few thousand times. The slab
> implementation failed due to heavy internal fragmentation. If your code
> runs fine with a few thousand users, then there shouldn't be a problem.
If there is a stress test I can use, I can try running it.
> For non-NUMA systems, I would use get_free_pages() to allocate a
> multi-page area instead of map_vm_area(). Typically, get_free_pages() is
> backed by large pte memory and map_vm_area() by normal virtual memory.
Hmm...the arithmetic becomes tricky then. Right now I allocate
NR_CPUS * PCU_BLOCKSIZE + BLOCK_MANAGEMENT_SIZE amount of KVA for a block,
allocate pages for cpu_possible cpus and map corresponding va space
with allocated pages using map_vm_area. We may fragment if
NR_CPUS * PCPU_BLOCKSIZE doesn't fit into a proper page order,
also we'd be wasting pages for !cpu_possible(cpus) of NR_CPUS
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/