• Javier González's avatar
    lightnvm: pblk: redesign GC algorithm · b20ba1bc
    Javier González authored
    At the moment, in order to get enough read parallelism, we have recycled
    several lines at the same time. This approach has proven not to work
    well when reaching capacity, since we end up mixing valid data from all
    lines, thus not maintaining a sustainable free/recycled line ratio.
    
    The new design, relies on a two level workqueue mechanism. In the first
    level, we read the metadata for a number of lines based on the GC list
    they reside on (this is governed by the number of valid sectors in each
    line). In the second level, we recycle a single line at a time. Here, we
    issue reads in parallel, while a single GC write thread places data in
    the write buffer. This design allows to (i) only move data from one line
    at a time, thus maintaining a sane free/recycled ration and (ii)
    maintain the GC writer busy with recycled data.
    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>
    b20ba1bc
pblk-rl.c 5.18 KB