Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1727358
| From | "Javier González" <jg@lightnvm.io> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 07/18] lightnvm: pblk: use constant for GC parameter |
| Date | 2017-09-06 13:00 +0200 |
| Message-ID | <umGdR-wH-53@gated-at.bofh.it> (permalink) |
| References | <umGdP-wH-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Use a constant instead of using meaningless tuning parameters on the
garbage collector algorithms.
Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <matias@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 6090d28f7995..92694e35afde 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 08a463fe855f..b7f5fa8b49d0 100644
--- a/drivers/lightnvm/pblk.h
+++ b/drivers/lightnvm/pblk.h
@@ -818,7 +818,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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/18] lightnvm: pblk patches for 4.14 "Javier González" <jg@lightnvm.io> - 2017-09-06 13:00 +0200
[PATCH 07/18] lightnvm: pblk: use constant for GC parameter "Javier González" <jg@lightnvm.io> - 2017-09-06 13:00 +0200
[PATCH 01/18] lightnvm: pblk: improve naming for internal req. "Javier González" <jg@lightnvm.io> - 2017-09-06 13:00 +0200
Re: [PATCH 01/18] lightnvm: pblk: improve naming for internal req. Christoph Hellwig <hch@infradead.org> - 2017-09-06 15:50 +0200
Re: [PATCH 01/18] lightnvm: pblk: improve naming for internal req. Javier González <jg@lightnvm.io> - 2017-09-06 16:10 +0200
Re: [PATCH 00/18] lightnvm: pblk patches for 4.14 Jens Axboe <axboe@kernel.dk> - 2017-09-06 16:10 +0200
Re: [PATCH 00/18] lightnvm: pblk patches for 4.14 Javier González <jg@lightnvm.io> - 2017-09-06 16:20 +0200
csiph-web