• Dennis Zhou (Facebook)'s avatar
    percpu: increase minimum percpu allocation size and align first regions · d2f3c384
    Dennis Zhou (Facebook) authored
    This patch increases the minimum allocation size of percpu memory to
    4-bytes. This change will help minimize the metadata overhead
    associated with the bitmap allocator. The assumption is that most
    allocations will be of objects or structs greater than 2 bytes with
    integers or longs being used rather than shorts.
    
    The first chunk regions are now aligned with the minimum allocation
    size. The reserved region is expected to be set as a multiple of the
    minimum allocation size. The static region is aligned up and the delta
    is removed from the dynamic size. This works because the dynamic size is
    increased to be page aligned. If the static size is not minimum
    allocation size aligned, then there must be a gap that is added to the
    dynamic size. The dynamic size will never be smaller than the set value.
    Signed-off-by: default avatarDennis Zhou <dennisszhou@gmail.com>
    Reviewed-by: default avatarJosef Bacik <jbacik@fb.com>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    d2f3c384
percpu.c 69 KB