diff options
author | Javier González <jg@lightnvm.io> | 2017-06-26 11:57:15 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-06-26 16:24:53 -0600 |
commit | d624f371d5c17a6e230ffed3f0371a4eb588bf45 (patch) | |
tree | 8518b6bcd4c0571041142c8637fa8dc38662a005 /drivers/lightnvm/pblk-core.c | |
parent | c2e9f5d457ad6a75516e749a3e544165766ab1ce (diff) | |
download | op-kernel-dev-d624f371d5c17a6e230ffed3f0371a4eb588bf45.zip op-kernel-dev-d624f371d5c17a6e230ffed3f0371a4eb588bf45.tar.gz |
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>
Diffstat (limited to 'drivers/lightnvm/pblk-core.c')
-rw-r--r-- | drivers/lightnvm/pblk-core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c index 567ed5a..a112554 100644 --- a/drivers/lightnvm/pblk-core.c +++ b/drivers/lightnvm/pblk-core.c @@ -61,7 +61,6 @@ static void pblk_end_io_erase(struct nvm_rq *rqd) { struct pblk *pblk = rqd->private; - up(&pblk->erase_sem); __pblk_end_io_erase(pblk, rqd); mempool_free(rqd, pblk->r_rq_pool); } @@ -1373,7 +1372,8 @@ struct pblk_line *pblk_line_get_data(struct pblk *pblk) return pblk->l_mg.data_line; } -struct pblk_line *pblk_line_get_data_next(struct pblk *pblk) +/* For now, always erase next line */ +struct pblk_line *pblk_line_get_erase(struct pblk *pblk) { return pblk->l_mg.data_next; } |