public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matias <mb@lightnvm.io>
To: Wenwei Tao <ww.tao0320@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: [PATCH] lightnvm: add full block direct to the gc list
Date: Wed, 6 Jan 2016 12:01:54 +0100	[thread overview]
Message-ID: <568CF422.5040801@lightnvm.io> (raw)
In-Reply-To: <CACygaLBj=hLK-ejaYvekXeNv2-cQj2GkbDv1mnncjS8bEJrxYw@mail.gmail.com>

On 01/05/2016 10:58 AM, Wenwei Tao wrote:
> You are right, a deadlock might occur if interrupt is not disabled.
>
> We might add the block to prio_list when we find the block is full in
> rrpc_alloc_addr and check whether all the writes are complete in
> rrpc_lun_gc, in this way we may avoid gcb allocation fail and irq
> disable issues.
>
> But this still has a problem. We allocate page from block before
> write, but the bio submission may fail, the bio never get execute and
> rrpc_end_io never get called on this bio, this may lead to a
> situation: a block's pages are all allocated, but not all of them are
> used. So this block is not fully used now, and will not get reclaimed
> for further use.
>
> I think we may need to put the page back when the page is not actually
> used/programmed.
You're right. It has to take multiple cases into account on failure, 
where if a write fails, it might mean the hole block must be written to 
a new block, the I/O it self must be remapped to another address, or 
something else depending on the error code. This logic is yet to be 
routed into rrpc.

Javier is working on write buffering, which will fix some of these issues.

      reply	other threads:[~2016-01-06 11:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-04  9:54 [PATCH] lightnvm: add full block direct to the gc list Wenwei Tao
2016-01-04 11:24 ` Matias Bjørling
2016-01-05  9:58   ` Wenwei Tao
2016-01-06 11:01     ` Matias [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=568CF422.5040801@lightnvm.io \
    --to=mb@lightnvm.io \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ww.tao0320@gmail.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