]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: pblk: choose optimal victim GC line
authorJavier González <jg@lightnvm.io>
Mon, 26 Jun 2017 09:57:23 +0000 (11:57 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 26 Jun 2017 22:27:39 +0000 (16:27 -0600)
commit2bbd932d199af75ae696bcae5d7aa054537da93e
tree895ebef437c4325bdcf61011f14bc961ce1bc78e
parent518591ca3cbedf9b4da73c922b4787c7112c7b22
lightnvm: pblk: choose optimal victim GC line

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: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <matias@cnexlabs.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/pblk-gc.c