summaryrefslogtreecommitdiffstats
path: root/mm/percpu.c
diff options
context:
space:
mode:
authorTejun Heo2009-08-14 08:00:52 +0200
committerTejun Heo2009-08-14 08:00:52 +0200
commitca23e405e06d5fffb005df004c72781f76062f51 (patch)
tree92f708eb81325c70c3e2827e68eb413c0c14d355 /mm/percpu.c
parentvmalloc: separate out insert_vmalloc_vm() (diff)
downloadkernel-qcow2-linux-ca23e405e06d5fffb005df004c72781f76062f51.tar.gz
kernel-qcow2-linux-ca23e405e06d5fffb005df004c72781f76062f51.tar.xz
kernel-qcow2-linux-ca23e405e06d5fffb005df004c72781f76062f51.zip
vmalloc: implement pcpu_get_vm_areas()
To directly use spread NUMA memories for percpu units, percpu allocator will be updated to allow sparsely mapping units in a chunk. As the distances between units can be very large, this makes allocating single vmap area for each chunk undesirable. This patch implements pcpu_get_vm_areas() and pcpu_free_vm_areas() which allocates and frees sparse congruent vmap areas. pcpu_get_vm_areas() take @offsets and @sizes array which define distances and sizes of vmap areas. It scans down from the top of vmalloc area looking for the top-most address which can accomodate all the areas. The top-down scan is to avoid interacting with regular vmallocs which can push up these congruent areas up little by little ending up wasting address space and page table. To speed up top-down scan, the highest possible address hint is maintained. Although the scan is linear from the hint, given the usual large holes between memory addresses between NUMA nodes, the scanning is highly likely to finish after finding the first hole for the last unit which is scanned first. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Nick Piggin <npiggin@suse.de>
Diffstat (limited to 'mm/percpu.c')
0 files changed, 0 insertions, 0 deletions