• Javier González's avatar
    lightnvm: pblk: choose optimal victim GC line · d45ebd47
    Javier González authored
    At the moment, we separate the closed lines on three different list
    based on their number of valid sectors. GC recycles lines from each list
    based on capacity. Lines from each list are taken in a FIFO fashion.
    
    Since the number of lines is limited (it corresponds to the number of
    blocks in a LUN, which is somewhere between 1000-2000), we can afford
    scanning the lists to choose the optimal line to be recycled. This helps
    specially in lines with a high number of valid sectors.
    
    If the number of blocks per LUN increases, we will consider a more
    efficient policy.
    Signed-off-by: default avatarJavier González <javier@cnexlabs.com>
    Signed-off-by: default avatarMatias Bjørling <matias@cnexlabs.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    d45ebd47
pblk-gc.c 12.8 KB