All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Matias Bjørling" <mb@lightnvm.io>
To: "Javier González" <jg@lightnvm.io>
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	"Javier González" <javier@cnexlabs.com>
Subject: Re: [PATCH] lightnvm: do not assume sequential lun alloc.
Date: Mon, 2 May 2016 10:22:41 +0200	[thread overview]
Message-ID: <57270E51.1060809@lightnvm.io> (raw)
In-Reply-To: <1461941209-6657-1-git-send-email-javier@cnexlabs.com>

On 04/29/2016 04:46 PM, Javier González wrote:
> When doing GC, rrpc calculates the physical LUN to which the rrpc block
> belongs too. This calculation is based on the assumption that LUNs are
> assigned sequentially to the LUN list. Use the reference to the LUN
> instead. This saves us the calculation and allows us to align LUNs in a
> different manner to, for example, take advantage of devide parallelism.
>
> Signed-off-by: Javier González <javier@cnexlabs.com>
> ---
>   drivers/lightnvm/rrpc.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
> index ffcfee6..48862ead 100644
> --- a/drivers/lightnvm/rrpc.c
> +++ b/drivers/lightnvm/rrpc.c
> @@ -405,9 +405,8 @@ static void rrpc_block_gc(struct work_struct *work)
>   									ws_gc);
>   	struct rrpc *rrpc = gcb->rrpc;
>   	struct rrpc_block *rblk = gcb->rblk;
> +	struct rrpc_lun *rlun = rblk->rlun;
>   	struct nvm_dev *dev = rrpc->dev;
> -	struct nvm_lun *lun = rblk->parent->lun;
> -	struct rrpc_lun *rlun = &rrpc->luns[lun->id - rrpc->lun_offset];
>
>   	mempool_free(gcb, rrpc->gcb_pool);
>   	pr_debug("nvm: block '%lu' being reclaimed\n", rblk->parent->id);
> @@ -508,9 +507,9 @@ static void rrpc_gc_queue(struct work_struct *work)
>   									ws_gc);
>   	struct rrpc *rrpc = gcb->rrpc;
>   	struct rrpc_block *rblk = gcb->rblk;
> +	struct rrpc_lun *rlun = rblk->rlun;
>   	struct nvm_lun *lun = rblk->parent->lun;
>   	struct nvm_block *blk = rblk->parent;
> -	struct rrpc_lun *rlun = &rrpc->luns[lun->id - rrpc->lun_offset];
>
>   	spin_lock(&rlun->lock);
>   	list_add_tail(&rblk->prio, &rlun->prio_list);
>

Thanks Javier. Applied for 4.7.

      reply	other threads:[~2016-05-02  8:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-29 14:46 [PATCH] lightnvm: do not assume sequential lun alloc Javier González
2016-05-02  8:22 ` Matias Bjørling [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=57270E51.1060809@lightnvm.io \
    --to=mb@lightnvm.io \
    --cc=javier@cnexlabs.com \
    --cc=jg@lightnvm.io \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.