linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Javier Gonzalez <javier@cnexlabs.com>
To: "Matias Bjørling" <mb@lightnvm.io>
Cc: Jens Axboe <axboe@kernel.dk>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] lightnvm: pblk: take write semaphore on metadata
Date: Wed, 29 Aug 2018 13:21:49 +0000	[thread overview]
Message-ID: <0FD404FB-C660-412B-9658-454A9DCD7558@cnexlabs.com> (raw)
In-Reply-To: <f4f8c276-0269-5aa5-39fc-42aecc7bb309@lightnvm.io>

[-- Attachment #1: Type: text/plain, Size: 1898 bytes --]

> On 29 Aug 2018, at 15.08, Matias Bjørling <mb@lightnvm.io> wrote:
> 
> On 08/29/2018 10:56 AM, Javier González wrote:
>> pblk guarantees write ordering at a chunk level through a per open chunk
>> semaphore. At this point, since we only have an open I/O stream for both
>> user and GC data, the semaphore is per parallel unit.
>> For the metadata I/O that is synchronous, the semaphore is not needed as
>> ordering is guaranteed. However, if the metadata scheme changes or
>> multiple streams are open, this guarantee might not be preserved.
>> This patch makes sure that all writes go through the semaphore, even for
>> synchronous I/O. This is consistent with pblk's write I/O model. It also
>> simplifies maintenance since changes in the metadata scheme could cause
>> ordering issues.
>> Signed-off-by: Javier González <javier@cnexlabs.com>
>> ---
>>  drivers/lightnvm/pblk-core.c | 16 +++++++++++++++-
>>  drivers/lightnvm/pblk.h      |  1 +
>>  2 files changed, 16 insertions(+), 1 deletion(-)
>> diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
>> index 767178185f19..1e4dc0c1ed88 100644
>> --- a/drivers/lightnvm/pblk-core.c
>> +++ b/drivers/lightnvm/pblk-core.c
>> @@ -558,6 +558,20 @@ int pblk_submit_io_sync(struct pblk *pblk, struct nvm_rq *rqd)
>>  	return ret;
>>  }
>>  +int pblk_submit_io_sync_sem(struct pblk *pblk, struct nvm_rq *rqd)
>> +{
>> +	struct ppa_addr *ppa_list;
>> +	int ret;
>> +
>> +	ppa_list = (rqd->nr_ppas > 1) ? rqd->ppa_list : &rqd->ppa_addr;
>> +
>> +	pblk_down_page(pblk, ppa_list, rqd->nr_ppas);
> 
> If the debug stuff is killed inside __pblk_down_page, then ppa_list
> and rqd->nr_ppas does not need to be passed, and this function can be
> inlined in its caller. Can we kill it? I'll make the patch if you
> like.

Sounds good. Sure, please send - should I wait to resend this series?


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-08-29 13:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-29  8:56 [V4 PATCH 0/2] lightnvm: pblk: take write semaphore on metadata Javier González
2018-08-29  8:56 ` [PATCH 1/3] lightnvm: pblk: refactor metadata paths Javier González
2018-08-29 13:02   ` Matias Bjørling
2018-08-29 13:19     ` Javier Gonzalez
2018-08-29  8:56 ` [PATCH 2/3] lightnvm: encapsule rqd dma allocations Javier González
2018-08-29 13:00   ` Matias Bjørling
2018-08-29 13:18     ` Javier Gonzalez
2018-08-29 13:36       ` Matias Bjørling
2018-08-29 13:41         ` Javier Gonzalez
2018-08-29 13:42           ` Matias Bjørling
2018-08-29  8:56 ` [PATCH 3/3] lightnvm: pblk: take write semaphore on metadata Javier González
2018-08-29 13:08   ` Matias Bjørling
2018-08-29 13:21     ` Javier Gonzalez [this message]
2018-08-29 13:40       ` Matias Bjørling
2018-08-29 13:41         ` Javier Gonzalez
2018-09-11 11:24 [V5 PATCH 0/3] " Javier González
2018-09-11 11:24 ` [PATCH 3/3] " Javier González

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=0FD404FB-C660-412B-9658-454A9DCD7558@cnexlabs.com \
    --to=javier@cnexlabs.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mb@lightnvm.io \
    /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;
as well as URLs for NNTP newsgroup(s).