Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751872AbdFGU6F (ORCPT ); Wed, 7 Jun 2017 16:58:05 -0400 Received: from g9t5009.houston.hpe.com ([15.241.48.73]:50849 "EHLO g9t5009.houston.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751784AbdFGU6C (ORCPT ); Wed, 7 Jun 2017 16:58:02 -0400 From: "Kani, Toshimitsu" To: "dan.j.williams@intel.com" CC: "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-nvdimm@lists.01.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: AQHS3770gIvIG2RgykSVdl0qpZhIVKIZw7kAgAAeJIA= Date: Wed, 7 Jun 2017 20:57:57 +0000 Message-ID: <1496869051.9288.1.camel@hpe.com> References: <20170607184947.18733-1-toshi.kani@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:YYEc17mPW9zmYJZ3+IexFJdzXAWrtHNDoOS5/ZBNESElu20/bRAheacmuHfaRbeUMjsr4jniBgmllAdDYLR286f1PvxFVm7RoN+WMMzlDyF3U6wsv/wkKrodGTSPMg1RNFd5NgsFdrZ+xjrEHpFq/YOn3F90skGnJ9GqkoAHO0ATjwe1UMsaapwDcuye7Mc2+67LK+fjQaDW1a1PiAI93LloL5hMXmuVi+warJ2MaClAVICAYGjCgGckR6h92PitDeOzsJYA0lXI2kjiHVF6n4tgoju+fP6r9/VwdbPjL6J8eoEp3fU6ooiuhatMDxg+V8qt1usEkY+/b9d7Dwykkw== x-ms-traffictypediagnostic: DF4PR84MB0108: x-ms-office365-filtering-correlation-id: 13028e87-dd42-453d-7ada-08d4ade7dfe6 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)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(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)(6009001)(39840400002)(39850400002)(39400400002)(39410400002)(39860400002)(39450400003)(24454002)(377424004)(377454003)(102836003)(478600001)(5640700003)(6486002)(2501003)(6436002)(229853002)(6916009)(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);DIR:OUT;SFP:1102;SCL:1;SRVR:DF4PR84MB0108;H:DF4PR84MB0105.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <8D0D1EC9E3B52B41AB5518D3BC20446D@NAMPRD84.PROD.OUTLOOK.COM> MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jun 2017 20:57:57.0307 (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 v57KwIWB019113 Content-Length: 1711 Lines: 44 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... > Another thing that seems to be missing in both this and the mce case > is a notification to userspace that something changed. We have calls > to sysfs_notify_dirent() to notify scrub completion events and DIMM > health status change events, I think we need a similar notifier > mechanism for new un-correctable errors. Good point. I think this can be a badblocks population event, which gets generated when badblocks information is updated at boot-time and run-time via this notification and MCE. Thanks, -Toshi