]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: pblk: generalize erase path
authorJavier González <jg@lightnvm.io>
Mon, 26 Jun 2017 09:57:15 +0000 (11:57 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 26 Jun 2017 22:24:53 +0000 (16:24 -0600)
commitecc424723ee6aee8afab7fcc824090cee4e9647d
tree8518b6bcd4c0571041142c8637fa8dc38662a005
parentdf1e6b64e9e073654b14bdc1834dfb5bb26b4f5f
lightnvm: pblk: generalize erase path

Erase I/Os are scheduled with the following goals in mind: (i) minimize
LUNs collisions with write I/Os, and (ii) even out the price of erasing
on every write, instead of putting all the burden on when garbage
collection runs. This works well on the current design, but is specific
to the default mapping algorithm.

This patch generalizes the erase path so that other mapping algorithms
can select an arbitrary line to be erased instead. It also gets rid of
the erase semaphore since it creates jittering for user writes.

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-core.c
drivers/lightnvm/pblk-init.c
drivers/lightnvm/pblk-map.c
drivers/lightnvm/pblk-rb.c
drivers/lightnvm/pblk-write.c
drivers/lightnvm/pblk.h