mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Javier González" <jg@lightnvm.io>
To: Rakesh Pandit <rakesh@tuxera.com>
Cc: "Matias Bjørling" <mb@lightnvm.io>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lightnvm: pblk: fix changing GC group list for a line
Date: Mon, 2 Oct 2017 13:44:35 +0200	[thread overview]
Message-ID: <01F673AF-1707-4717-A822-3A554E4EA229@lightnvm.io> (raw)
In-Reply-To: <20171002114344.GA3526@dhcp-216.srv.tuxera.com>

[-- Attachment #1: Type: text/plain, Size: 2267 bytes --]

> On 2 Oct 2017, at 13.43, Rakesh Pandit <rakesh@tuxera.com> wrote:
> 
> On Mon, Oct 02, 2017 at 01:27:42PM +0200, Javier González wrote:
>>> On 28 Sep 2017, at 16.40, Rakesh Pandit <rakesh@tuxera.com> wrote:
>>> 
>>> pblk_line_gc_list seems to had a bug since the introduction of pblk in
>>> getting GC list for a line.  In b20ba1bc7 while redesigning GC
>>> algorithm it was not fixed correctly.  The problem is that even if
>>> valid sector count (vsc) is less that mid_thrs (threshold for GC mid
>>> list) it would always satisfy 'vsc < high_thrs' as high_thrs >
>>> mid_thrs always.
>>> 
>>> Fixes: a4bd217b4("lightnvm: physical block device (pblk) target")
>>> Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
>>> ---
>>> drivers/lightnvm/pblk-core.c | 10 +++++-----
>>> 1 file changed, 5 insertions(+), 5 deletions(-)
>>> 
>>> diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
>>> index 8150164..93a58ed 100644
>>> --- a/drivers/lightnvm/pblk-core.c
>>> +++ b/drivers/lightnvm/pblk-core.c
>>> @@ -295,16 +295,16 @@ struct list_head *pblk_line_gc_list(struct pblk *pblk, struct pblk_line *line)
>>> 			line->gc_group = PBLK_LINEGC_FULL;
>>> 			move_list = &l_mg->gc_full_list;
>>> 		}
>>> -	} else if (vsc < lm->high_thrs) {
>>> -		if (line->gc_group != PBLK_LINEGC_HIGH) {
>>> -			line->gc_group = PBLK_LINEGC_HIGH;
>>> -			move_list = &l_mg->gc_high_list;
>>> -		}
>>> 	} else if (vsc < lm->mid_thrs) {
>>> 		if (line->gc_group != PBLK_LINEGC_MID) {
>>> 			line->gc_group = PBLK_LINEGC_MID;
>>> 			move_list = &l_mg->gc_mid_list;
>>> 		}
>>> +	} else if (vsc < lm->high_thrs) {
>>> +		if (line->gc_group != PBLK_LINEGC_HIGH) {
>>> +			line->gc_group = PBLK_LINEGC_HIGH;
>>> +			move_list = &l_mg->gc_high_list;
>>> +		}
>>> 	} else if (vsc < line->sec_in_line) {
>>> 		if (line->gc_group != PBLK_LINEGC_LOW) {
>>> 			line->gc_group = PBLK_LINEGC_LOW;
>>> --
>>> 2.9.3
>> 
>> You're right that the naming for high/mid/low was not updated when
>> aligning vsc with GC thresholds. But the fix should be making high,
>> being high, instead of reordering when moving into the GC bucket.
>> 
>> Does it make sense to you?
> 
> Yes.
> 

Cool. I'll fix it when picking it up.

Javier

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2017-10-02 11:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28 14:40 Rakesh Pandit
2017-10-02 11:27 ` Javier González
2017-10-02 11:43   ` Rakesh Pandit
2017-10-02 11:44     ` Javier González [this message]

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=01F673AF-1707-4717-A822-3A554E4EA229@lightnvm.io \
    --to=jg@lightnvm.io \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mb@lightnvm.io \
    --cc=rakesh@tuxera.com \
    /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®