From: Dan Williams <dan.j.williams@intel.com>
To: linux-nvdimm <linux-nvdimm@lists.01.org>
Cc: Erwin Tsaur <erwin.tsaur@oracle.com>,
Vishal L Verma <vishal.l.verma@intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/6] nfit/ars: Allow root to busy-poll the ARS state machine
Date: Thu, 14 Feb 2019 12:27:02 -0800 [thread overview]
Message-ID: <CAPcyv4g83aNP_CF+hygCEQ=9dRL9beC7vGGLQDg9=rMy2+nPfQ@mail.gmail.com> (raw)
In-Reply-To: <155017502147.944049.2893295352368862579.stgit@dwillia2-desk3.amr.corp.intel.com>
On Thu, Feb 14, 2019 at 12:23 PM Dan Williams <dan.j.williams@intel.com> wrote:
>
> The ARS implementation implements exponential back-off on the poll
> interval to prevent high-frequency access to the DIMM / platform
> interface. Depending on when the ARS completes the poll interval may
> exceed the completion event by minutes. Allow root to reset the timeout
> each time it probes the status. A one-second timeout is still enforced,
> but root can otherwise can control the poll interval.
>
> Reported-by: Erwin Tsaur <erwin.tsaur@oracle.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
> drivers/acpi/nfit/core.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
> index 934be96dc149..5ec0e19760ea 100644
> --- a/drivers/acpi/nfit/core.c
> +++ b/drivers/acpi/nfit/core.c
> @@ -1328,6 +1328,12 @@ static ssize_t scrub_show(struct device *dev,
> rc = sprintf(buf, "%d%s", acpi_desc->scrub_count,
> acpi_desc->scrub_busy
> && !acpi_desc->cancel ? "+\n" : "\n");
> + /* Allow an admin to poll the busy state at a higher rate */
> + if (acpi_desc->scrub_busy && !acpi_desc->cancel
> + && capable(CAP_SYS_RAWIO)) {
> + acpi_desc->scrub_tmo = 1;
> + queue_delayed_work(nfit_wq, &acpi_desc->dwork, HZ);
Whoops, just realized this should be mod_delayed_work().
queue_delayed_work() is a nop if the work is already scheduled. v2
inbound.
next prev parent reply other threads:[~2019-02-14 20:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 20:10 [PATCH 0/6] nfit/ars: Improve polling and short-ARS execution Dan Williams
2019-02-14 20:10 ` [PATCH 1/6] nfit/ars: Attempt a short-ARS whenever the ARS state is idle at boot Dan Williams
2019-02-14 20:10 ` [PATCH 2/6] nfit/ars: Attempt short-ARS even in the no_init_ars case Dan Williams
2019-02-14 20:10 ` [PATCH 3/6] nfit/ars: Allow root to busy-poll the ARS state machine Dan Williams
2019-02-14 20:19 ` [PATCH v2] " Dan Williams
2019-02-15 16:43 ` Dan Williams
2019-02-14 20:27 ` Dan Williams [this message]
2019-02-14 20:10 ` [PATCH 4/6] nfit/ars: Remove ars_start_flags Dan Williams
2019-02-14 20:10 ` [PATCH 5/6] nfit/ars: Introduce scrub_flags Dan Williams
2019-02-14 20:10 ` [PATCH 6/6] nfit/ars: Avoid stale ARS results 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='CAPcyv4g83aNP_CF+hygCEQ=9dRL9beC7vGGLQDg9=rMy2+nPfQ@mail.gmail.com' \
--to=dan.j.williams@intel.com \
--cc=erwin.tsaur@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=vishal.l.verma@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 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).