lightnvm: pblk: issue multiplane reads if possible

If a read request is sequential and its size aligns with a
multi-plane page size, use the multi-plane hint to process the I/O in
parallel in the controller.

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>
This commit is contained in:
Javier González
2017-06-26 11:57:20 +02:00
committed by Jens Axboe
parent 0880a9aa2d
commit f9c101523d
4 changed files with 51 additions and 12 deletions

View File

@@ -1075,9 +1075,27 @@ static inline int pblk_set_progr_mode(struct pblk *pblk, int type)
return flags;
}
static inline int pblk_set_read_mode(struct pblk *pblk)
enum {
PBLK_READ_RANDOM = 0,
PBLK_READ_SEQUENTIAL = 1,
};
static inline int pblk_set_read_mode(struct pblk *pblk, int type)
{
return NVM_IO_SNGL_ACCESS | NVM_IO_SUSPEND | NVM_IO_SCRAMBLE_ENABLE;
struct nvm_tgt_dev *dev = pblk->dev;
struct nvm_geo *geo = &dev->geo;
int flags;
flags = NVM_IO_SUSPEND | NVM_IO_SCRAMBLE_ENABLE;
if (type == PBLK_READ_SEQUENTIAL)
flags |= geo->plane_mode >> 1;
return flags;
}
static inline int pblk_io_aligned(struct pblk *pblk, int nr_secs)
{
return !(nr_secs % pblk->min_write_pgs);
}
#ifdef CONFIG_NVM_DEBUG