All of lore.kernel.org
 help / color / mirror / Atom feed
From: Javier Gonzalez <javier@cnexlabs.com>
To: Hans Holmberg <hans.ml.holmberg@owltronix.com>
Cc: "Matias Bjørling" <mb@lightnvm.io>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Hans Holmberg" <hans.holmberg@cnexlabs.com>
Subject: Re: [PATCH 4/4] lightnvm: pblk: add tracing for chunk resets
Date: Wed, 29 Aug 2018 20:09:38 +0000	[thread overview]
Message-ID: <AE72A23A-F779-466B-89A7-846A232DD9B2@cnexlabs.com> (raw)
In-Reply-To: <1535545877-770-5-git-send-email-hans.ml.holmberg@owltronix.com>

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

> On 29 Aug 2018, at 14.31, Hans Holmberg <hans.ml.holmberg@owltronix.com> wrote:
> 
> From: Hans Holmberg <hans.holmberg@cnexlabs.com>
> 
> Trace state of chunk resets.
> 
> Signed-off-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
> ---
> drivers/lightnvm/pblk-core.c  | 12 ++++++++++++
> drivers/lightnvm/pblk-trace.h | 31 +++++++++++++++++++++++++++++++
> drivers/lightnvm/pblk.h       |  6 ++++++
> 3 files changed, 49 insertions(+)
> 
> diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
> index 566a5d3165ee..b874001d1175 100644
> --- a/drivers/lightnvm/pblk-core.c
> +++ b/drivers/lightnvm/pblk-core.c
> @@ -90,9 +90,15 @@ static void __pblk_end_io_erase(struct pblk *pblk, struct nvm_rq *rqd)
> 	atomic_dec(&line->left_seblks);
> 
> 	if (rqd->error) {
> +		trace_pblk_chunk_reset(pblk_disk_name(pblk),
> +				&rqd->ppa_addr, PBLK_CHUNK_RESET_FAILED);
> +
> 		chunk->state = NVM_CHK_ST_OFFLINE;
> 		pblk_mark_bb(pblk, line, rqd->ppa_addr);
> 	} else {
> +		trace_pblk_chunk_reset(pblk_disk_name(pblk),
> +				&rqd->ppa_addr, PBLK_CHUNK_RESET_DONE);
> +
> 		chunk->state = NVM_CHK_ST_FREE;
> 	}
> 
> @@ -958,6 +964,9 @@ int pblk_line_erase(struct pblk *pblk, struct pblk_line *line)
> 		WARN_ON(test_and_set_bit(bit, line->erase_bitmap));
> 		spin_unlock(&line->lock);
> 
> +		trace_pblk_chunk_reset(pblk_disk_name(pblk),
> +				&ppa, PBLK_CHUNK_RESET_START);
> +

Can you move this inside of pblk_blk_erase_sync() instead? I was looking
at the code now to implement a different thing and it is confusing to
see tracing inside erase_async and not in erase_sync.

Thanks,
Javier

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

  reply	other threads:[~2018-08-30  0:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-29 12:31 [PATCH 0/4] Introduce trace events for pblk Hans Holmberg
2018-08-29 12:31 ` [PATCH 1/4] lightnvm: pblk: add trace events for chunk states Hans Holmberg
2018-08-29 12:31 ` [PATCH 2/4] lightnvm: pblk: add trace events for line state changes Hans Holmberg
2018-08-29 12:31 ` [PATCH 3/4] lightnvm: pblk: add trace events for pblk " Hans Holmberg
2018-08-29 12:31 ` [PATCH 4/4] lightnvm: pblk: add tracing for chunk resets Hans Holmberg
2018-08-29 20:09   ` Javier Gonzalez [this message]
2018-09-04 10:39     ` Hans Holmberg
2018-08-29 14:22 ` [PATCH 0/4] Introduce trace events for pblk Matias Bjørling

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=AE72A23A-F779-466B-89A7-846A232DD9B2@cnexlabs.com \
    --to=javier@cnexlabs.com \
    --cc=hans.holmberg@cnexlabs.com \
    --cc=hans.ml.holmberg@owltronix.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.