summaryrefslogtreecommitdiffstats
path: root/mm/percpu-internal.h
diff options
context:
space:
mode:
authorDennis Zhou (Facebook) <dennisszhou@gmail.com>2017-07-24 19:01:59 -0400
committerTejun Heo <tj@kernel.org>2017-07-26 10:23:51 -0400
commite22667056644086ca4a5b2986eb4fbf32e03ebab (patch)
tree8b1b70d76afee6e1cdae2cf7b70cac76ef0ce503 /mm/percpu-internal.h
parentfb29a2cc6b06e057ab7153a85190a96f66498ff4 (diff)
downloadlinux-e22667056644086ca4a5b2986eb4fbf32e03ebab.tar.bz2
percpu: introduce start_offset to pcpu_chunk
The reserved chunk arithmetic uses a global variable pcpu_reserved_chunk_limit that is set in the first chunk init code to hide a portion of the area map. The bitmap allocator to come will eventually move the base_addr up and require both the reserved chunk and static chunk to maintain this offset. pcpu_reserved_chunk_limit is removed and start_offset is added. The first chunk that is circulated and is pcpu_first_chunk serves the dynamic region, the region following the reserved region. The reserved chunk address check will temporarily use the first chunk to identify its address range. A following patch will increase the base_addr and remove this. If there is no reserved chunk, this will check the static region and return false because those values should never be passed into the allocator. Lastly, when linking in the first chunk, make sure to count the right free region for the number of empty populated pages. Signed-off-by: Dennis Zhou <dennisszhou@gmail.com> Reviewed-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'mm/percpu-internal.h')
-rw-r--r--mm/percpu-internal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/percpu-internal.h b/mm/percpu-internal.h
index c9158a48ca05..92fc0121dfff 100644
--- a/mm/percpu-internal.h
+++ b/mm/percpu-internal.h
@@ -28,6 +28,9 @@ struct pcpu_chunk {
contain reservation for static chunk.
Dynamic chunk will contain reservation
for static and reserved chunks. */
+ int start_offset; /* the overlap with the previous
+ region to have a page aligned
+ base_addr */
int nr_populated; /* # of populated pages */
unsigned long populated[]; /* populated bitmap */
};