Re: [PATCH 0/8] nfit, libnvdimm: async address range scrub

From: Verma, Vishal L
Date: Tue Mar 01 2016 - 20:45:16 EST


On Tue, 2016-02-23 at 18:16 -0800, Dan Williams wrote:
> Given the capacities of next generation persistent memory devices a
> scrub operation to find all poison may take 10s of seconds.ÂÂWe want
> this scrub work to be done asynchronously with the rest of system
> initialization, so we move it out of line from the NFIT probing, i.e.
> acpi_nfit_add().
>
> However, we may want to synchronously wait for that scrubbing to
> complete before we probe any pmem devices.ÂÂConsider the case where
> consuming poison triggers a machine check and a reboot.ÂÂThat event
> will
> trigger platform firmware to initiate a scrub.ÂÂThe kernel should
> complete any firmware initiated scrubs as those likely indicate the
> presence of known poison.
>
> When errors are not present, platform firmware did not initiate
> scrubbing, we still scrub, but asynchronously.ÂÂThis trades off a risk
> of hitting new unknown poison ranges with making the data available
> faster after loading the driver.
>
> This async scrub capability is also useful in the future when we
> integrate Tony Luck's mcsafe_copy() (or whatever it is
> eventually called).ÂÂAfter a machine check recovery event we can scrub
> the pmem namespace to see if there are any other latent errors and
> otherwise update the 'badblocks' list with the new entries.
>
> This passes the libndctl unit test suite, with some minor updates to
> account for the fact that when "modprobe nfit_test" returns not all
> regions are registered.
>
> ---
>
> Dan Williams (8):
> ÂÂÂÂÂÂlibnvdimm, nfit: centralize command status translation
> ÂÂÂÂÂÂlibnvdimm: protect nvdimm_{bus|namespace}_add_poison() with
> nvdimm_bus_lock()
> ÂÂÂÂÂÂlibnvdimm: async notification support
> ÂÂÂÂÂÂnfit, tools/testing/nvdimm: unify common init for acpi_nfit_desc
> ÂÂÂÂÂÂnfit, libnvdimm: async region scrub workqueue
> ÂÂÂÂÂÂnfit: scrub and register regions in a workqueue
> ÂÂÂÂÂÂnfit: disable userspace initiated ars during scrub
> ÂÂÂÂÂÂtools/testing/nvdimm: expand ars unit testing
>
>
> Âdrivers/acpi/nfit.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ761 +++++++++++++++++++++++++++
> -----------
> Âdrivers/acpi/nfit.hÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ24 +
> Âdrivers/nvdimm/bus.cÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ46 ++
> Âdrivers/nvdimm/core.cÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ110 ++++-
> Âdrivers/nvdimm/dimm_devs.cÂÂÂÂÂÂÂ|ÂÂÂÂ6Â
> Âdrivers/nvdimm/nd.hÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂÂ2Â
> Âdrivers/nvdimm/pmem.cÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ15 +
> Âdrivers/nvdimm/region.cÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ12 +
> Âinclude/linux/libnvdimm.hÂÂÂÂÂÂÂÂ|ÂÂÂÂ5Â
> Âinclude/linux/nd.hÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂÂ7Â
> Âtools/testing/nvdimm/test/nfit.c |ÂÂ133 +++++--
> Â11 files changed, 809 insertions(+), 312 deletions(-)


Hi Dan,

Looks good to me, thanks for knocking this out!

For the series,
Reviewed-by: Vishal Verma <vishal.l.verma@xxxxxxxxx>