From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756732AbcCBBpK (ORCPT ); Tue, 1 Mar 2016 20:45:10 -0500 Received: from mga01.intel.com ([192.55.52.88]:33409 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755138AbcCBBpF (ORCPT ); Tue, 1 Mar 2016 20:45:05 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,524,1449561600"; d="scan'208";a="58019415" From: "Verma, Vishal L" To: "Williams, Dan J" , "linux-nvdimm@lists.01.org" CC: "linux-kernel@vger.kernel.org" , "linux-acpi@vger.kernel.org" Subject: Re: [PATCH 0/8] nfit, libnvdimm: async address range scrub Thread-Topic: [PATCH 0/8] nfit, libnvdimm: async address range scrub Thread-Index: AQHRbqmOF8io1Fyp+kWp0Cg3xmFJup9F8woA Date: Wed, 2 Mar 2016 01:45:03 +0000 Message-ID: <1456883098.4525.9.camel@intel.com> References: <20160224021655.22776.87952.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <20160224021655.22776.87952.stgit@dwillia2-desk3.amr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.232.112.171] Content-Type: text/plain; charset="utf-8" Content-ID: <464B2A60F1359C4CA00C70D3709709D7@intel.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u221jM6S008871 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