• Joe Thornber's avatar
    dm cache policy mq: reduce memory requirements · 633618e3
    Joe Thornber authored
    Rather than storing the cblock in each cache entry, we allocate all
    entries in an array and infer the cblock from the entry position.
    
    Saves 4 bytes of memory per cache block.  In addition, this gives us an
    easy way of looking up cache entries by cblock.
    
    We no longer need to keep an explicit bitset to track which cblocks
    have been allocated.  And no searching is needed to find free cblocks.
    Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    633618e3
dm-cache-policy-mq.c 28.8 KB