On Fri, Mar 30, 2018 at 5:52 PM, Dave Jiang <dave.jiang(a)intel.com> wrote:
On initialization we are going to set bit 1 of Start ARS DSM flag.
This
allows us to retrieve the data from the previous scrub without starting a
scrub. This is to obtain any badblocks on all the DIMMs that does not have
scrubbing started by the BIOS. Previously we block surfacing the regions
until ARS is completed on all regions. That has been removed and we will
now do scrubbing in the background with a delayed workqueue. The delayed
workqueue will be scheduled starting at 1 second delay and doubled every
time it has to be rescheduled up to 30 minutes delay. The reschedule will
no longer be timing out.
Signed-off-by: Dave Jiang <dave.jiang(a)intel.com>
---
drivers/acpi/nfit/core.c | 263 ++++++++++++++++++++++------------------------
drivers/acpi/nfit/nfit.h | 14 ++
2 files changed, 135 insertions(+), 142 deletions(-)
With the change in policy to never wait for the initial scrub and
perform quick scrubs at initialization time I think this rework needs
to include the removal of acpi_desc->init_complete. Also, to make the
request based scrubbing easier to understand I think
acpi_desc->ars_start_flags needs to be killed in favor of a
per-nfit_spa request flags to trigger "return previous data" scrubs.
Once we have request flags per-nfit_spa I think we can also reduce the
number of scrub states from 6. Given the short time we have to land
this for 4.17 I'll take a stab at this further rework, but this patch
has definitely helped identify the further cleanups that are possible
from where I had things originally.