From: Vishal Verma <vishal.l.verma@intel.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: "linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Tony Luck <tony.luck@intel.com>,
Linux ACPI <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH 2/3] nfit, libnvdimm: allow an ARS rescan to be triggered on demand
Date: Tue, 19 Jul 2016 12:32:04 -0600 [thread overview]
Message-ID: <20160719183204.GF12960@omniknight.lm.intel.com> (raw)
In-Reply-To: <CAPcyv4gdbB7=qT=5Q=aQqJrgoYaKsZDX9mrkAA8D0XVZbb9sbA@mail.gmail.com>
On 07/19, Dan Williams wrote:
> On Tue, Jul 19, 2016 at 10:45 AM, Vishal Verma <vishal.l.verma@intel.com> wrote:
> > On 07/19, Dan Williams wrote:
> >> On Mon, Jul 18, 2016 at 5:44 PM, Vishal Verma <vishal.l.verma@intel.com> wrote:
> >> > Normally, an ARS (Address Range Scrub) only happens at
> >> > boot/initialization time. There can however arise situations where a
> >> > bus-wide rescan is needed - notably, in the case of discovering a latent
> >> > media error, we should do a full rescan to figure out what other sectors
> >> > are bad, and thus potentially avoid triggering an mce on them in the
> >> > future. Also provide a sysfs trigger to start a bus-wide rescan.
> >> >
> >> > Cc: Dan Williams <dan.j.williams@intel.com>
> >> > Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >> > Cc: <linux-acpi@vger.kernel.org>
> >> > Cc: <linux-nvdimm@lists.01.org>
> >> > Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
> >> > ---
> >> > drivers/acpi/nfit.c | 36 ++++++++++++++++++++++++++++++++----
> >> > drivers/acpi/nfit.h | 1 +
> >> > drivers/nvdimm/core.c | 17 +++++++++++++++++
> >> > include/linux/libnvdimm.h | 1 +
> >> > 4 files changed, 51 insertions(+), 4 deletions(-)
> >> >
> >> > diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
> >> > index ac6ddcc0..def9505 100644
> >> > --- a/drivers/acpi/nfit.c
> >> > +++ b/drivers/acpi/nfit.c
> >> > @@ -2138,8 +2138,9 @@ static void acpi_nfit_async_scrub(struct acpi_nfit_desc *acpi_desc,
> >> > unsigned int tmo = scrub_timeout;
> >> > int rc;
> >> >
> >> > - if (nfit_spa->ars_done || !nfit_spa->nd_region)
> >> > - return;
> >> > + if (!nfit_spa->ars_rescan)
> >> > + if (nfit_spa->ars_done || !nfit_spa->nd_region)
> >> > + return;
> >>
> >> Do we need a new flag? Why not just clear ->ars_done?
> >
> > This is what I had started out with - clearing the done flag, but the
> > done flag gets set at the end of acpi_nfit_scrub if a region has been
> > registered for that SPA. In the rescan case, we'll almost always have
> > our regions registered, so the done flag will get set here, and
> > acpi_nfit_async_scrub won't look at it at all..
>
> Maybe just flip the polarity of ->ars_done to ->ars_do? Seems we
> should be able to get away with not adding a new flag.
Will it make a difference? We essentially use the do/done flag to decide
which SPAs need further ARS work, i.e. ars_nfit_async_scrub. When we're
running at init time, the SPAs that need to go into _async_scrub can be
a subset of all SPAs because for some of them, the scrub may be complete,
and we may have valid results. For the rescan case, _all_ SPAs need to be
_async_scrub 'ed.
Unless we change the initilization case to also start ARS for all SPAs
irrespective of whether we found good results or not, I'm not sure I see
how we can reuse the same flag?
WARNING: multiple messages have this Message-ID (diff)
From: Vishal Verma <vishal.l.verma@intel.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Linux ACPI <linux-acpi@vger.kernel.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Tony Luck <tony.luck@intel.com>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: Re: [PATCH 2/3] nfit, libnvdimm: allow an ARS rescan to be triggered on demand
Date: Tue, 19 Jul 2016 12:32:04 -0600 [thread overview]
Message-ID: <20160719183204.GF12960@omniknight.lm.intel.com> (raw)
In-Reply-To: <CAPcyv4gdbB7=qT=5Q=aQqJrgoYaKsZDX9mrkAA8D0XVZbb9sbA@mail.gmail.com>
On 07/19, Dan Williams wrote:
> On Tue, Jul 19, 2016 at 10:45 AM, Vishal Verma <vishal.l.verma@intel.com> wrote:
> > On 07/19, Dan Williams wrote:
> >> On Mon, Jul 18, 2016 at 5:44 PM, Vishal Verma <vishal.l.verma@intel.com> wrote:
> >> > Normally, an ARS (Address Range Scrub) only happens at
> >> > boot/initialization time. There can however arise situations where a
> >> > bus-wide rescan is needed - notably, in the case of discovering a latent
> >> > media error, we should do a full rescan to figure out what other sectors
> >> > are bad, and thus potentially avoid triggering an mce on them in the
> >> > future. Also provide a sysfs trigger to start a bus-wide rescan.
> >> >
> >> > Cc: Dan Williams <dan.j.williams@intel.com>
> >> > Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >> > Cc: <linux-acpi@vger.kernel.org>
> >> > Cc: <linux-nvdimm@lists.01.org>
> >> > Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
> >> > ---
> >> > drivers/acpi/nfit.c | 36 ++++++++++++++++++++++++++++++++----
> >> > drivers/acpi/nfit.h | 1 +
> >> > drivers/nvdimm/core.c | 17 +++++++++++++++++
> >> > include/linux/libnvdimm.h | 1 +
> >> > 4 files changed, 51 insertions(+), 4 deletions(-)
> >> >
> >> > diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
> >> > index ac6ddcc0..def9505 100644
> >> > --- a/drivers/acpi/nfit.c
> >> > +++ b/drivers/acpi/nfit.c
> >> > @@ -2138,8 +2138,9 @@ static void acpi_nfit_async_scrub(struct acpi_nfit_desc *acpi_desc,
> >> > unsigned int tmo = scrub_timeout;
> >> > int rc;
> >> >
> >> > - if (nfit_spa->ars_done || !nfit_spa->nd_region)
> >> > - return;
> >> > + if (!nfit_spa->ars_rescan)
> >> > + if (nfit_spa->ars_done || !nfit_spa->nd_region)
> >> > + return;
> >>
> >> Do we need a new flag? Why not just clear ->ars_done?
> >
> > This is what I had started out with - clearing the done flag, but the
> > done flag gets set at the end of acpi_nfit_scrub if a region has been
> > registered for that SPA. In the rescan case, we'll almost always have
> > our regions registered, so the done flag will get set here, and
> > acpi_nfit_async_scrub won't look at it at all..
>
> Maybe just flip the polarity of ->ars_done to ->ars_do? Seems we
> should be able to get away with not adding a new flag.
Will it make a difference? We essentially use the do/done flag to decide
which SPAs need further ARS work, i.e. ars_nfit_async_scrub. When we're
running at init time, the SPAs that need to go into _async_scrub can be
a subset of all SPAs because for some of them, the scrub may be complete,
and we may have valid results. For the rescan case, _all_ SPAs need to be
_async_scrub 'ed.
Unless we change the initilization case to also start ARS for all SPAs
irrespective of whether we found good results or not, I'm not sure I see
how we can reuse the same flag?
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
next prev parent reply other threads:[~2016-07-19 18:32 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 0:44 [PATCH 0/3] ARS rescanning triggered by latent errors or userspace Vishal Verma
2016-07-19 0:44 ` Vishal Verma
2016-07-19 0:44 ` [PATCH 1/3] pmem: clarify a debug print in pmem_clear_poison Vishal Verma
2016-07-19 0:44 ` Vishal Verma
[not found] ` <1468889100-30698-2-git-send-email-vishal.l.verma-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-07-19 15:53 ` Dan Williams
2016-07-19 15:53 ` Dan Williams
2016-07-19 17:15 ` Verma, Vishal L
2016-07-19 17:15 ` Verma, Vishal L
2016-07-19 17:56 ` Vishal Verma
2016-07-19 17:56 ` Vishal Verma
[not found] ` <1468889100-30698-1-git-send-email-vishal.l.verma-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-07-19 0:44 ` [PATCH 2/3] nfit, libnvdimm: allow an ARS rescan to be triggered on demand Vishal Verma
2016-07-19 0:44 ` Vishal Verma
[not found] ` <1468889100-30698-3-git-send-email-vishal.l.verma-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-07-19 16:15 ` Dan Williams
2016-07-19 16:15 ` Dan Williams
[not found] ` <CAPcyv4guVe2Mm_EaBMMRqpfCahR_E0xbhtE30VoDAb+sqvK=AQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-19 17:45 ` Vishal Verma
2016-07-19 17:45 ` Vishal Verma
2016-07-19 18:00 ` Dan Williams
2016-07-19 18:00 ` Dan Williams
2016-07-19 18:32 ` Vishal Verma [this message]
2016-07-19 18:32 ` Vishal Verma
2016-07-19 0:45 ` [PATCH 3/3] nfit: do an ARS rescan on hitting a latent media error Vishal Verma
2016-07-19 0:45 ` Vishal Verma
[not found] ` <1468889100-30698-4-git-send-email-vishal.l.verma-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-07-19 16:24 ` Dan Williams
2016-07-19 16:24 ` Dan Williams
2016-07-19 17:55 ` Vishal Verma
2016-07-19 17:55 ` Vishal Verma
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=20160719183204.GF12960@omniknight.lm.intel.com \
--to=vishal.l.verma@intel.com \
--cc=dan.j.williams@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=rafael.j.wysocki@intel.com \
--cc=tony.luck@intel.com \
/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.