Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2387285imm; Tue, 4 Sep 2018 03:41:34 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYmql2yqTdZOrwcuXDXhEEMOM13o19WXjzJlK8KJ3Bo1RXZqU17SqPIiMKAsdaKeAXFzjQQ X-Received: by 2002:a65:6086:: with SMTP id t6-v6mr15914715pgu.424.1536057693978; Tue, 04 Sep 2018 03:41:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536057693; cv=none; d=google.com; s=arc-20160816; b=xtndMQtMLjyfQbPLCHS5YpGRHmtFVaWrto8ZlKPJnZsqqePmDpuLUxoa/pQTBy6Vbs HH04OAkOrgYO+5fbHAhZf+9d8Liq/ST2n7bCjSuP0pMsj5vWkZG6QR+FI5KSxP3J3ysn tYZkgaQBUU/p24mZxAnIux6OFup0JO39mKLzEkdlGdHJhk39cJKQQRt9I4dP3NyYKUsp YkgJklMSmk8HA4DkaXwvrCpeQgvNkDhxH8KACJYedHvmRFEP9F3d874ekwVQcRVs4WeZ K/3XFNL6x/kklwb8QFa1vaU6xp8SiipzrBVLzInIYsGaS74gKRMlcNggFXrH3DEZ+M8T PREQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=GXLKVKrpdHaAiGg7SyFGjtz1XjDdIadRdAZPuM8b6fc=; b=E8CKOqVXU30vun/koH5aV3HFH+7yAcmPJ0mTiplKDOkNE0NEOuliJUfAElJcJWt2BX Wuygl3u66u3Vpe7D2+QOm1+ydwgLpqWeJ3oBoBRWONCmoYSow/99eQk32x/UcQn5BbMg l9UDUNKsxCHQcRI5TYnWtDxbXg0CKSFOc9TDagf+ZlHOt2SjXteTC3iI7Ianvxg1OIWG +ZeVoHQu5Oi5cWDm6lUH4DOlInuFpHSRt2KtFZID/ozBFRJFNF5sQOxukWtmfxIghAKl WD9iDUK6I6pw49FWUmaLsmUTlQvztIn+eIyWZWcRUxiS92M/Tq7+fYQnhYHHQUQjyW8q HbNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@owltronix-com.20150623.gappssmtp.com header.s=20150623 header.b="CjNi2+/A"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s184-v6si19929907pgb.123.2018.09.04.03.41.18; Tue, 04 Sep 2018 03:41:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@owltronix-com.20150623.gappssmtp.com header.s=20150623 header.b="CjNi2+/A"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727406AbeIDPEa (ORCPT + 99 others); Tue, 4 Sep 2018 11:04:30 -0400 Received: from mail-ua1-f68.google.com ([209.85.222.68]:39033 "EHLO mail-ua1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726208AbeIDPE3 (ORCPT ); Tue, 4 Sep 2018 11:04:29 -0400 Received: by mail-ua1-f68.google.com with SMTP id g18-v6so2464035uam.6 for ; Tue, 04 Sep 2018 03:39:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=owltronix-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GXLKVKrpdHaAiGg7SyFGjtz1XjDdIadRdAZPuM8b6fc=; b=CjNi2+/A7CV8bMoMKizrcQwS1D7uFOUPPzuD90Gf5JTNs279rd0vzj8wuCRpOb6KxA yDy2GusFYyyWAtAJGmyLiHVRmOi6tZ7i3gkm6a3JVq6DsFQi+4JzMI3cOB4/0fC4Ebbl Fo0x19DUrSGLFyq5w4lSCT0ZVnf5pArIWGqDVPsuyYhMbwxe+m1bPRWKHwdaEb9FAu2D Dkl1noZC1BZm+k4QyrgWglitzm21FazE90F2YM31acct+1EFRvgPUu8zddCret9Xn8Kv JD3fE29UMHTqUQECdzaBGfnrBXWhEv7iKpEF9YR94SU3i+cTDQdE5wrlANCI5ztLMBqH lkzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GXLKVKrpdHaAiGg7SyFGjtz1XjDdIadRdAZPuM8b6fc=; b=W5twfpFriKEKRFckH6oAX5wUvu7vndEn5luUaasTP/B8DyNyzGYo6/LhEnWLQ2BZxd X1mK9fSuVikVZQG1eIq4ptf1AUfpYIsjvwRZuUDYdOzZwFSHGS3w/D0lZCtDzaUQmbM9 5bWrKz9Km25xySVk6R0p5OMXuKu2OgLHA9DW8br0dI8PtJ+N4sKLSGh+sgNGB9bCiqgc Wiylfcc3BIxtdSokG6/IfRnSpZbQEhKo5YPXnbJ/5EuJWCkUCCAKgtSm14/rQ86GJAkQ DlD5XYo//LApT+hizmi4kIBVbBe9SMuRxdE+MI/nMJJQsLWixoySi3m//F3GZhjuA811 bq4w== X-Gm-Message-State: APzg51AZwzgjnjWst2J+HIe3GaMEzDxiZWcbIBZZaiKhl6eUbdDBL5IP 8MTNiXgNLLoHwdXdoe6pJKYVejrP4mFVBNJUvCQTrgfKzoM= X-Received: by 2002:a67:744b:: with SMTP id p72-v6mr10224535vsc.101.1536057597403; Tue, 04 Sep 2018 03:39:57 -0700 (PDT) MIME-Version: 1.0 References: <1535545877-770-1-git-send-email-hans.ml.holmberg@owltronix.com> <1535545877-770-5-git-send-email-hans.ml.holmberg@owltronix.com> In-Reply-To: From: Hans Holmberg Date: Tue, 4 Sep 2018 12:39:46 +0200 Message-ID: Subject: Re: [PATCH 4/4] lightnvm: pblk: add tracing for chunk resets To: Javier Gonzalez Cc: Matias Bjorling , linux-block@vger.kernel.org, Linux Kernel Mailing List , Hans Holmberg Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 29, 2018 at 10:09 PM Javier Gonzalez wrote: > > > On 29 Aug 2018, at 14.31, Hans Holmberg wrote: > > > > From: Hans Holmberg > > > > Trace state of chunk resets. > > > > Signed-off-by: Hans Holmberg > > --- > > 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.