Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751549AbdFGVeJ (ORCPT ); Wed, 7 Jun 2017 17:34:09 -0400 Received: from g4t3425.houston.hpe.com ([15.241.140.78]:5300 "EHLO g4t3425.houston.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751072AbdFGVeH (ORCPT ); Wed, 7 Jun 2017 17:34:07 -0400 X-Greylist: delayed 9832 seconds by postgrey-1.27 at vger.kernel.org; Wed, 07 Jun 2017 17:34:07 EDT From: "Kani, Toshimitsu" To: "dan.j.williams@intel.com" CC: "linux-kernel@vger.kernel.org" , "linux-nvdimm@lists.01.org" , "linux-acpi@vger.kernel.org" , "rjw@rjwysocki.net" , "vishal.l.verma@intel.com" Subject: Re: [PATCH] Add support of NVDIMM memory error notification in ACPI 6.2 Thread-Topic: [PATCH] Add support of NVDIMM memory error notification in ACPI 6.2 Thread-Index: AQHS3770gIvIG2RgykSVdl0qpZhIVKIZw7kAgAAeJICAAAKEgIAAB20A Date: Wed, 7 Jun 2017 21:33:31 +0000 Message-ID: <1496871186.9288.3.camel@hpe.com> References: <20170607184947.18733-1-toshi.kani@hpe.com> <1496869051.9288.1.camel@hpe.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=hpe.com; x-originating-ip: [15.211.195.8] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DF4PR84MB0108;7:hQxCiGu6neKGQInh3obRuw4ux4bu8+LHU6g720G4AU44JySJAB1LHSQN854GHgNb2hbvTKSqWGXXydfs2PnhZ5eOslKyFT4g02pjrV2RCqhHMPpmrXG542tIZdw52xCeOE7hyxigbL4KYdnpb36zYSNEURwZFY4/nJcM8vUhd0Vr78iU+Tpgzv+HeGWaViAvvKEFOeBsiH/eyfylNiMJgtzKFhEVcrfPoTl0zj3S6VFUe9GdbLfUH6/B+ZuKJQ3To4YgBu6YTmGLePkDLnCDUm3iiIXQinmXkZMREx06HpOWfA7Q4ZNQqWhxUUzfUeS//h/cd3geFT3fAzFAejAKSA== x-ms-traffictypediagnostic: DF4PR84MB0108: x-ms-office365-filtering-correlation-id: 2bf924f7-7de1-4889-268a-08d4adecd805 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081);SRVR:DF4PR84MB0108; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DF4PR84MB0108;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DF4PR84MB0108; x-forefront-prvs: 03319F6FEF x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(979002)(6009001)(39400400002)(39850400002)(39840400002)(39860400002)(39410400002)(39450400003)(24454002)(377424004)(54094003)(377454003)(102836003)(93886004)(478600001)(5640700003)(6486002)(2501003)(6436002)(6916009)(229853002)(14454004)(3846002)(77096006)(2950100002)(6116002)(6506006)(2900100001)(15650500001)(8676002)(33646002)(2906002)(2351001)(53546009)(25786009)(5660300001)(3660700001)(103116003)(66066001)(8936002)(7736002)(86362001)(189998001)(36756003)(81166006)(6246003)(53936002)(122556002)(110136004)(38730400002)(4326008)(3280700002)(305945005)(50986999)(54906002)(6512007)(54356999)(76176999)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1102;SCL:1;SRVR:DF4PR84MB0108;H:DF4PR84MB0105.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <343E154C7E43AF46AFC6168967726141@NAMPRD84.PROD.OUTLOOK.COM> MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jun 2017 21:33:31.2310 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR84MB0108 X-OriginatorOrg: hpe.com 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 v57LYP2j022829 Content-Length: 1873 Lines: 48 On Wed, 2017-06-07 at 14:06 -0700, Dan Williams wrote: > On Wed, Jun 7, 2017 at 1:57 PM, Kani, Toshimitsu > wrote: > > On Wed, 2017-06-07 at 12:09 -0700, Dan Williams wrote: > > > On Wed, Jun 7, 2017 at 11:49 AM, Toshi Kani > > > wrote: > > > >  : > > > > + > > > > +static void acpi_nfit_uc_error_notify(struct device *dev, > > > > acpi_handle handle) > > > > +{ > > > > +       struct acpi_nfit_desc *acpi_desc = > > > > dev_get_drvdata(dev); > > > > + > > > > +       acpi_nfit_ars_rescan(acpi_desc); > > > > > > I wonder if we should gate re-scanning with a similar: > > > > > >     if (acpi_desc->scrub_mode == HW_ERROR_SCRUB_ON) > > > > > > ...check that we do in the mce notification case? Maybe not since > > > we > > > don't get an indication of where the error is without a rescan. > > > > I think this mce case is different since the MCE handler already > > knows where the new poison location is and can update badblocks > > information for it.  Starting ARS is an optional precaution. > > > > > However, at a minimum I think we need support for the new Start > > > ARS flag ("If set to 1 the firmware shall return data from a > > > previous scrub, if any, without starting a new scrub") and use > > > that for this case. > > > > That's an interesting idea.  But I wonder how users know if it is > > OK to set this flag as it relies on BIOS implementation that is not > > described in ACPI... > > Ugh, you're right. We might need a revision-id=2 version of Start ARS > so software knows that the BIOS is aware of the new flag. My bad. Looking at ACPI 6.2, it actually defines what you described. Start ARS now defines bit[1] in Flags which can be set to avoid scanning for this notification. I will update the patch to set this flag when HW_ERROR_SCRUB_ON is not set. Thanks, -Toshi