aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm/pblk-core.c
diff options
context:
space:
mode:
authorJavier González <jg@lightnvm.io>2017-06-26 05:57:28 -0400
committerJens Axboe <axboe@kernel.dk>2017-06-26 18:27:39 -0400
commitef5764946b1314e0aa1ab261493de6b9aa482ff9 (patch)
tree20994287473b382deffea5f0877f1da8277d772f /drivers/lightnvm/pblk-core.c
parentb20ba1bc749ce0cd7a74d24f23826a6462c3de53 (diff)
lightnvm: pblk: set mempool and workqueue params.
Make constants to define sizes for internal mempools and workqueues. In this process, adjust the values to be more meaningful given the internal constrains of the FTL. In order to do this for workqueues, separate the current auxiliary workqueue into two dedicated workqueues to manage lines being closed and bad blocks. 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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
index ba3b88f0e1f7..823e53f95a80 100644
--- a/drivers/lightnvm/pblk-core.c
+++ b/drivers/lightnvm/pblk-core.c
@@ -33,7 +33,7 @@ static void pblk_mark_bb(struct pblk *pblk, struct pblk_line *line,
33 pr_err("pblk: attempted to erase bb: line:%d, pos:%d\n", 33 pr_err("pblk: attempted to erase bb: line:%d, pos:%d\n",
34 line->id, pos); 34 line->id, pos);
35 35
36 pblk_line_run_ws(pblk, NULL, ppa, pblk_line_mark_bb); 36 pblk_line_run_ws(pblk, NULL, ppa, pblk_line_mark_bb, pblk->bb_wq);
37} 37}
38 38
39static void __pblk_end_io_erase(struct pblk *pblk, struct nvm_rq *rqd) 39static void __pblk_end_io_erase(struct pblk *pblk, struct nvm_rq *rqd)
@@ -1528,7 +1528,8 @@ void pblk_line_mark_bb(struct work_struct *work)
1528} 1528}
1529 1529
1530void pblk_line_run_ws(struct pblk *pblk, struct pblk_line *line, void *priv, 1530void pblk_line_run_ws(struct pblk *pblk, struct pblk_line *line, void *priv,
1531 void (*work)(struct work_struct *)) 1531 void (*work)(struct work_struct *),
1532 struct workqueue_struct *wq)
1532{ 1533{
1533 struct pblk_line_ws *line_ws; 1534 struct pblk_line_ws *line_ws;
1534 1535
@@ -1541,7 +1542,7 @@ void pblk_line_run_ws(struct pblk *pblk, struct pblk_line *line, void *priv,
1541 line_ws->priv = priv; 1542 line_ws->priv = priv;
1542 1543
1543 INIT_WORK(&line_ws->ws, work); 1544 INIT_WORK(&line_ws->ws, work);
1544 queue_work(pblk->kw_wq, &line_ws->ws); 1545 queue_work(wq, &line_ws->ws);
1545} 1546}
1546 1547
1547void pblk_down_rq(struct pblk *pblk, struct ppa_addr *ppa_list, int nr_ppas, 1548void pblk_down_rq(struct pblk *pblk, struct ppa_addr *ppa_list, int nr_ppas,