diff options
author | Tejun Heo <tj@kernel.org> | 2009-08-14 15:00:52 +0900 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-08-14 15:00:52 +0900 |
commit | ca23e405e06d5fffb005df004c72781f76062f51 (patch) | |
tree | 92f708eb81325c70c3e2827e68eb413c0c14d355 /mm/migrate.c | |
parent | cf88c79006bd6a09ad725ba0b34c0e23db20b19e (diff) | |
download | linux-stable-ca23e405e06d5fffb005df004c72781f76062f51.tar.gz linux-stable-ca23e405e06d5fffb005df004c72781f76062f51.tar.bz2 linux-stable-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/migrate.c')
0 files changed, 0 insertions, 0 deletions