From: Dan Williams <dan.j.williams@intel.com>
To: "Kani, Toshi" <toshi.kani@hpe.com>
Cc: "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: Re: [PATCH 5/6] nfit, address-range-scrub: rework and simplify ARS state machine
Date: Wed, 4 Apr 2018 10:08:26 -0700 [thread overview]
Message-ID: <CAPcyv4iKKDWnVoDJ8j=kF7gpcp+APkxBu9VW=5SShCRLYaa6tw@mail.gmail.com> (raw)
In-Reply-To: <1522859143.2693.296.camel@hpe.com>
On Wed, Apr 4, 2018 at 9:26 AM, Kani, Toshi <toshi.kani@hpe.com> wrote:
> On Mon, 2018-04-02 at 21:46 -0700, Dan Williams wrote:
> :
>> +static int init_ars(struct acpi_nfit_desc *acpi_desc, struct nfit_spa *nfit_spa,
>> +int query_rc)
>> {
>> -struct acpi_nfit_system_address *spa = nfit_spa->spa;
>> -unsigned int overflow_retry = scrub_overflow_abort;
>> -u64 init_ars_start = 0, init_ars_len = 0;
>> -struct device *dev = acpi_desc->dev;
>> -unsigned int tmo = scrub_timeout;
>> int rc;
>>
>> -if (!test_bit(ARS_REQ, &nfit_spa->ars_state) || !nfit_spa->nd_region)
>> -return;
>> +switch (query_rc) {
>> +case 0:
>> +/* ARS is idle, lets look for critical known errors... */
>> +break;
>> +case -EBUSY:
>> +/*
>> + * ARS is already running, some agent thought it was ok
>> + * to busy ARS before handing off to the nfit driver.
>> + */
>> +clear_bit(ARS_SHORT, &nfit_spa->ars_state);
>> +rc = query_rc;
>> +goto out;
>> +case -ENOSPC:
>> +/* ARS continuation needed... */
>> +clear_bit(ARS_SHORT, &nfit_spa->ars_state);
>> +rc = query_rc;
>> +goto out;
>> +default:
>> +rc = query_rc;
>> +goto out;
>> +}
>>
>> +WARN_ON_ONCE(!test_bit(ARS_SHORT, &nfit_spa->ars_state));
>
> I am hitting this WARN_ON_ONCE. I think there is an issue in the code
> flow that ars_complete() clears ARS_SHORT before init_ars().
>
> acpi_nfit_scrub
> acpi_nfit_query_poison
> ars_status_process_records
> ars_complete
> init_ars
Yes, I think we are inadvertently double completing operations. I have
a new version that adds an ARS_DONE flag to make sure we are only
completing ARS once.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
next prev parent reply other threads:[~2018-04-04 17:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 4:46 [PATCH 0/6] nfit, address-range-scrub: rework and fixes Dan Williams
2018-04-03 4:46 ` [PATCH 1/6] nfit: fix region registration vs block-data-window ranges Dan Williams
2018-04-03 15:30 ` Dave Jiang
[not found] ` <152273076649.38372.8379231668189794225.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-04-06 20:05 ` Sasha Levin
2018-04-03 4:46 ` [PATCH 2/6] nfit, address-range-scrub: fix scrub in-progress reporting Dan Williams
2018-04-03 15:31 ` Dave Jiang
[not found] ` <152273077198.38372.11857145045474104173.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-04-06 20:05 ` Sasha Levin
2018-04-03 4:46 ` [PATCH 3/6] libnvdimm: add an api to cast a 'struct nd_region' to its 'struct device' Dan Williams
2018-04-03 15:31 ` Dave Jiang
2018-04-03 4:46 ` [PATCH 4/6] nfit, address-range-scrub: introduce nfit_spa->ars_state Dan Williams
2018-04-03 15:31 ` Dave Jiang
2018-04-03 4:46 ` [PATCH 5/6] nfit, address-range-scrub: rework and simplify ARS state machine Dan Williams
2018-04-03 15:29 ` Dave Jiang
2018-04-03 15:33 ` Dan Williams
2018-04-04 16:26 ` Kani, Toshi
2018-04-04 17:08 ` Dan Williams [this message]
2018-04-03 4:46 ` [PATCH 6/6] nfit, address-range-scrub: add module option to skip initial ars Dan Williams
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='CAPcyv4iKKDWnVoDJ8j=kF7gpcp+APkxBu9VW=5SShCRLYaa6tw@mail.gmail.com' \
--to=dan.j.williams@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=toshi.kani@hpe.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 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).