lkml.org 
[lkml]   [2016]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] lightnvm: add full block direct to the gc list
From
Date
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.


\
 
 \ /
  Last update: 2016-01-06 12:41    [W:0.096 / U:0.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site