Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1323090 > unrolled thread

[PATCH] lightnvm: invalidate addresses on multipage fail

Started by"Javier González" <jg@lightnvm.io>
First post2016-02-01 14:20 +0100
Last post2016-02-03 09:20 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] lightnvm: invalidate addresses on multipage fail "Javier González" <jg@lightnvm.io> - 2016-02-01 14:20 +0100
    Re: [PATCH] lightnvm: invalidate addresses on multipage fail Matias Bjørling <mb@lightnvm.io> - 2016-02-03 09:20 +0100
      Re: [PATCH] lightnvm: invalidate addresses on multipage fail Javier González <jg@lightnvm.io> - 2016-02-03 09:20 +0100

#1323090 — [PATCH] lightnvm: invalidate addresses on multipage fail

From"Javier González" <jg@lightnvm.io>
Date2016-02-01 14:20 +0100
Subject[PATCH] lightnvm: invalidate addresses on multipage fail
Message-ID<qXmyC-3iQ-3@gated-at.bofh.it>
If a page mapping fails when mapping several pages in a single write bio
request, make sure that already mapped pages are invalidated. Since
other legit mappings coming from a different bio request might have
occurred, rolling back the failed bio is a difficult, unnecessary
overhead; in part because when a mapping fails something bad has
happened already. Still, invalidating pages in the failed bio will help
GC.

Signed-off-by: Javier González <javier@cnexlabs.com>
---
 drivers/lightnvm/rrpc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
index c4d0b04..29befe9 100644
--- a/drivers/lightnvm/rrpc.c
+++ b/drivers/lightnvm/rrpc.c
@@ -730,6 +730,7 @@ static int rrpc_read_ppalist_rq(struct rrpc *rrpc, struct bio *bio,
 		} else {
 			BUG_ON(is_gc);
 			rrpc_unlock_laddr(rrpc, r);
+			rrpc_invalidate_range(rrpc, laddr, i + 1);
 			nvm_dev_dma_free(rrpc->dev, rqd->ppa_list,
 							rqd->dma_ppa_list);
 			return NVM_IO_DONE;
-- 
2.1.4

[toc] | [next] | [standalone]


#1325022

FromMatias Bjørling <mb@lightnvm.io>
Date2016-02-03 09:20 +0100
Message-ID<qY0Po-7NH-1@gated-at.bofh.it>
In reply to#1323090
On 02/01/2016 02:10 PM, Javier González wrote:
> If a page mapping fails when mapping several pages in a single write bio
> request, make sure that already mapped pages are invalidated. Since
> other legit mappings coming from a different bio request might have
> occurred, rolling back the failed bio is a difficult, unnecessary
> overhead; in part because when a mapping fails something bad has
> happened already. Still, invalidating pages in the failed bio will help
> GC.
> 
> Signed-off-by: Javier González <javier@cnexlabs.com>
> ---
>  drivers/lightnvm/rrpc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
> index c4d0b04..29befe9 100644
> --- a/drivers/lightnvm/rrpc.c
> +++ b/drivers/lightnvm/rrpc.c
> @@ -730,6 +730,7 @@ static int rrpc_read_ppalist_rq(struct rrpc *rrpc, struct bio *bio,
>  		} else {
>  			BUG_ON(is_gc);
>  			rrpc_unlock_laddr(rrpc, r);
> +			rrpc_invalidate_range(rrpc, laddr, i + 1);
>  			nvm_dev_dma_free(rrpc->dev, rqd->ppa_list,
>  							rqd->dma_ppa_list);
>  			return NVM_IO_DONE;
> 

I'm not sure I understand this. This is in the read path, why would it
need to invalidate pages if a page is not mapped?

[toc] | [prev] | [next] | [standalone]


#1325026

FromJavier González <jg@lightnvm.io>
Date2016-02-03 09:20 +0100
Message-ID<qY0Po-7NH-15@gated-at.bofh.it>
In reply to#1325022

[Multipart message — attachments visible in raw view] — view raw

> 
> On 03 Feb 2016, at 09:10, Matias Bjørling <mb@lightnvm.io> wrote:
> 
> On 02/01/2016 02:10 PM, Javier González wrote:
>> If a page mapping fails when mapping several pages in a single write bio
>> request, make sure that already mapped pages are invalidated. Since
>> other legit mappings coming from a different bio request might have
>> occurred, rolling back the failed bio is a difficult, unnecessary
>> overhead; in part because when a mapping fails something bad has
>> happened already. Still, invalidating pages in the failed bio will help
>> GC.
>> 
>> Signed-off-by: Javier González <javier@cnexlabs.com>
>> ---
>> drivers/lightnvm/rrpc.c | 1 +
>> 1 file changed, 1 insertion(+)
>> 
>> diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
>> index c4d0b04..29befe9 100644
>> --- a/drivers/lightnvm/rrpc.c
>> +++ b/drivers/lightnvm/rrpc.c
>> @@ -730,6 +730,7 @@ static int rrpc_read_ppalist_rq(struct rrpc *rrpc, struct bio *bio,
>> 		} else {
>> 			BUG_ON(is_gc);
>> 			rrpc_unlock_laddr(rrpc, r);
>> +			rrpc_invalidate_range(rrpc, laddr, i + 1);
>> 			nvm_dev_dma_free(rrpc->dev, rqd->ppa_list,
>> 							rqd->dma_ppa_list);
>> 			return NVM_IO_DONE;
> 
> I'm not sure I understand this. This is in the read path, why would it
> need to invalidate pages if a page is not mapped?

You are right. I sent the wrong patch. I’ll send the right one now.

Javier

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web