aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm/pblk-write.c
diff options
context:
space:
mode:
authorJavier González <javier@cnexlabs.com>2017-10-13 08:46:07 -0400
committerJens Axboe <axboe@kernel.dk>2017-10-13 10:34:57 -0400
commitb84ae4a8b883b96b95fff0e3979ff2c65bbf96b0 (patch)
tree6f53ea3c0f6d9afd67e3e86354197467a9e495da /drivers/lightnvm/pblk-write.c
parentbd432417681a224d9fa4a9d43be7d4edc82135b2 (diff)
lightnvm: pblk: simplify work_queue mempool
In pblk, we have a mempool to allocate a generic structure that we pass along workqueues. This is heavily used in the GC path in order to have enough inflight reads and fully utilize the GC bandwidth. However, the current GC path copies data to the host memory and puts it back into the write buffer. This requires a vmalloc allocation for the data and a memory copy. Thus, guaranteeing the allocation by using a mempool for the structure in itself does not give us much. Until we implement support for vector copy to avoid moving data through the host, just allocate the workqueue structure using kmalloc. This allows us to have a much smaller mempool. Reported-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Javier González <javier@cnexlabs.com> Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/lightnvm/pblk-write.c')
-rw-r--r--drivers/lightnvm/pblk-write.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/lightnvm/pblk-write.c b/drivers/lightnvm/pblk-write.c
index d82ca8bd8390..c73b17bca06b 100644
--- a/drivers/lightnvm/pblk-write.c
+++ b/drivers/lightnvm/pblk-write.c
@@ -198,8 +198,8 @@ static void pblk_end_io_write_meta(struct nvm_rq *rqd)
198 198
199 sync = atomic_add_return(rqd->nr_ppas, &emeta->sync); 199 sync = atomic_add_return(rqd->nr_ppas, &emeta->sync);
200 if (sync == emeta->nr_entries) 200 if (sync == emeta->nr_entries)
201 pblk_line_run_ws(pblk, line, NULL, pblk_line_close_ws, 201 pblk_gen_run_ws(pblk, line, NULL, pblk_line_close_ws,
202 pblk->close_wq); 202 GFP_ATOMIC, pblk->close_wq);
203 203
204 bio_put(rqd->bio); 204 bio_put(rqd->bio);
205 nvm_dev_dma_free(dev->parent, rqd->meta_list, rqd->dma_meta_list); 205 nvm_dev_dma_free(dev->parent, rqd->meta_list, rqd->dma_meta_list);