• Dennis Zhou's avatar
    percpu: remember largest area skipped during allocation · b89462a9
    Dennis Zhou authored
    Percpu allocations attempt to do first fit by scanning forward from the
    first_free of a block. However, fragmentation from allocation requests
    can cause holes not seen by block hint update functions. To address
    this, create a local version of bitmap_find_next_zero_area_off() that
    remembers the largest area skipped over. The caveat is that it only sees
    regions skipped over due to not fitting, not regions skipped due to
    alignment.
    
    Prior to updating the scan_hint, a scan backwards is done to try and
    recover free bits skipped due to alignment. While this can cause
    scanning to miss earlier possible free areas, smaller allocations will
    eventually fill those holes due to first fit.
    Signed-off-by: default avatarDennis Zhou <dennis@kernel.org>
    b89462a9
percpu.c 91.6 KB