Messages in this thread | | | Subject | Re: [PATCH] lightnvm: add full block direct to the gc list | From | Matias <> | Date | Wed, 6 Jan 2016 12:01:54 +0100 |
| |
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.
| |