• Nils Goroll's avatar
    fellow_log: rewrite bitfield allocation · 376249c4
    Nils Goroll authored
    The previous implementation used only one BUDDY_REQS, so whenever one
    segment allocation was fulfilled, other requests with lower priority
    could "get through" and ultimately lead to bfa_alloc() failing to
    complete.
    
    By using two BUDDY_REQS, we now make sure to "keep out place in the
    priority queue".
    
    We also limit cramming not only by the available bitfield segment slots,
    but also by a maximum of 4 (1/16th of the requested size) and yield when
    a lower cram does not succeed to motivate LRU more to make room.
    
    This has undergone a _lot_ of testing and has gone through many
    iterations, which all have been squashed into this commit.
    376249c4
fellow_log.c 159 KB