From: "Javier González" <jg@lightnvm.io>
To: linux-block@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, "Javier González" <javier@cnexlabs.com>
Subject: [PATCH 01/11] lightnvm: pblk: use constant for GC max inflight
Date: Fri, 15 Sep 2017 14:25:29 +0200 [thread overview]
Message-ID: <1505478339-13089-2-git-send-email-javier@cnexlabs.com> (raw)
In-Reply-To: <1505478339-13089-1-git-send-email-javier@cnexlabs.com>
Use a constant to set the maximum number of inflight GC requests
allowed.
Signed-off-by: Javier González <javier@cnexlabs.com>
---
drivers/lightnvm/pblk-gc.c | 4 ++--
drivers/lightnvm/pblk.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/lightnvm/pblk-gc.c b/drivers/lightnvm/pblk-gc.c
index f163829ecca8..c21b2077432a 100644
--- a/drivers/lightnvm/pblk-gc.c
+++ b/drivers/lightnvm/pblk-gc.c
@@ -93,7 +93,7 @@ static int pblk_gc_move_valid_secs(struct pblk *pblk, struct pblk_gc_rq *gc_rq)
retry:
spin_lock(&gc->w_lock);
- if (gc->w_entries >= PBLK_GC_W_QD) {
+ if (gc->w_entries >= PBLK_GC_RQ_QD) {
spin_unlock(&gc->w_lock);
pblk_gc_writer_kick(&pblk->gc);
usleep_range(128, 256);
@@ -602,7 +602,7 @@ int pblk_gc_init(struct pblk *pblk)
spin_lock_init(&gc->w_lock);
spin_lock_init(&gc->r_lock);
- sema_init(&gc->gc_sem, 128);
+ sema_init(&gc->gc_sem, PBLK_GC_RQ_QD);
INIT_LIST_HEAD(&gc->w_list);
INIT_LIST_HEAD(&gc->r_list);
diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h
index 469976a20421..afd967b55d94 100644
--- a/drivers/lightnvm/pblk.h
+++ b/drivers/lightnvm/pblk.h
@@ -815,7 +815,7 @@ int pblk_recov_setup_rq(struct pblk *pblk, struct pblk_c_ctx *c_ctx,
* pblk gc
*/
#define PBLK_GC_MAX_READERS 8 /* Max number of outstanding GC reader jobs */
-#define PBLK_GC_W_QD 128 /* Queue depth for inflight GC write I/Os */
+#define PBLK_GC_RQ_QD 128 /* Queue depth for inflight GC requests */
#define PBLK_GC_L_QD 4 /* Queue depth for inflight GC lines */
#define PBLK_GC_RSV_LINE 1 /* Reserved lines for GC */
--
2.7.4
next prev parent reply other threads:[~2017-09-15 12:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-15 12:25 [PATCH 00/11] lightnvm: pblk: cleanup Javier González
2017-09-15 12:25 ` Javier González [this message]
2017-09-15 12:25 ` [PATCH 02/11] lightnvm: pblk: normalize ppa namings Javier González
2017-09-15 12:25 ` [PATCH 03/11] lightnvm: pblk: refactor read lba sanity check Javier González
2017-09-15 12:25 ` [PATCH 04/11] lightnvm: pblk: simplify data validity check on GC Javier González
2017-09-15 12:25 ` [PATCH 05/11] lightnvm: pblk: refactor read path " Javier González
2017-09-15 12:25 ` [PATCH 06/11] lightnvm: pblk: put bio on bio completion Javier González
2017-09-15 12:25 ` [PATCH 07/11] lightnvm: pblk: simplify path on REQ_PREFLUSH Javier González
2017-09-15 12:25 ` [PATCH 08/11] lightnvm: pblk: allocate bio size more accurately Javier González
2017-09-15 12:25 ` [PATCH 09/11] lightnvm: pblk: improve naming for internal req Javier González
2017-09-15 12:25 ` [PATCH 10/11] lightnvm: pblk: refactor rqd alloc/free Javier González
2017-09-15 12:25 ` [PATCH 11/11] lightnvm: pblk: use rqd->end_io for completion Javier González
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1505478339-13089-2-git-send-email-javier@cnexlabs.com \
--to=jg@lightnvm.io \
--cc=javier@cnexlabs.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®