lkml.org 
[lkml]   [2018]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 4/4] lightnvm: pblk: add tracing for chunk resets
On Wed, Aug 29, 2018 at 10:09 PM Javier Gonzalez <javier@cnexlabs.com> wrote:
>
> > 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.
>

Fixed in a V2. Thanks.

\
 
 \ /
  Last update: 2018-09-04 12:40    [W:0.044 / U:31.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site