summaryrefslogtreecommitdiff
path: root/init/main.c
diff options
context:
space:
mode:
authorDennis Zhou (Facebook) <dennisszhou@gmail.com>2017-07-24 19:02:19 -0400
committerTejun Heo <tj@kernel.org>2017-07-26 17:41:06 -0400
commitb4c2116cfae65b09761b7ba34453733e745a6f77 (patch)
tree301f2c2ed922ec0acd862bf042c20a397213bf8e /init/main.c
parent525ca84daec01825b0d037f5fcf60adb7f510118 (diff)
percpu: update pcpu_find_block_fit to use an iterator
The simple, and expensive, way to find a free area is to iterate over the entire bitmap until an area is found that fits the allocation size and alignment. This patch makes use of an iterate that find an area to check by using the block level contig hints. It will only return an area that can fit the size and alignment request. If the request can fit inside a block, it returns the first_free bit to start checking from to see if it can be fulfilled prior to the contig hint. The pcpu_alloc_area check has a bound of a block size added in case it is wrong. 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 'init/main.c')
0 files changed, 0 insertions, 0 deletions