From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from g4t3426.houston.hpe.com (g4t3426.houston.hpe.com [15.241.140.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 173C821A04823 for ; Mon, 1 May 2017 09:12:17 -0700 (PDT) From: "Kani, Toshimitsu" Subject: Re: [PATCH] libnvdimm: rework region badblocks clearing Date: Mon, 1 May 2017 16:12:13 +0000 Message-ID: <1493655131.30303.17.camel@hpe.com> References: <149355594185.9917.1577772489949690281.stgit@dwillia2-desk3.amr.corp.intel.com> <1493652871.30303.15.camel@hpe.com> In-Reply-To: Content-Language: en-US Content-ID: MIME-Version: 1.0 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: "dan.j.williams@intel.com" Cc: "linux-kernel@vger.kernel.org" , "linux-nvdimm@lists.01.org" List-ID: T24gTW9uLCAyMDE3LTA1LTAxIGF0IDA4OjUyIC0wNzAwLCBEYW4gV2lsbGlhbXMgd3JvdGU6DQo+ IE9uIE1vbiwgTWF5IDEsIDIwMTcgYXQgODo0MyBBTSwgRGFuIFdpbGxpYW1zIDxkYW4uai53aWxs aWFtc0BpbnRlbC5jbw0KPiBtPiB3cm90ZToNCj4gPiBPbiBNb24sIE1heSAxLCAyMDE3IGF0IDg6 MzQgQU0sIEthbmksIFRvc2hpbWl0c3UgPHRvc2hpLmthbmlAaHBlLmNvDQo+ID4gbT4gd3JvdGU6 DQo+ID4gPiBPbiBTdW4sIDIwMTctMDQtMzAgYXQgMDU6MzkgLTA3MDAsIERhbiBXaWxsaWFtcyB3 cm90ZToNCiA6DQo+ID4gPiANCj4gPiA+IEhpIERhbiwNCj4gPiA+IA0KPiA+ID4gSSB3YXMgdGVz dGluZyB0aGUgY2hhbmdlIHdp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ZXJjcHUsIHNvIHRoYXQgd291bGQgYWxzbyBuZWVkIHRvIGJlIHJlbW92ZWQu DQoNCkkgZG8gbm90IGhhdmUgYSBnb29kIGlkZWEgZWl0aGVyLCBidXQgSSdkIHJhdGhlciBkaXNh YmxlIHRoaXMgY2xlYXJpbmcNCmluIHRoZSByZWd1bGFyIEJUVCB3cml0ZSBwYXRoIHRoYW4gYWRk aW5nIHNsZWVwaW5nIGxvY2tzIHRvIEJUVC4gDQpDbGVhcmluZyBhIGJhZCBibG9jayBpbiB0aGUg QlRUIHdyaXRlIHBhdGggaXMgZGlmZmljdWx0L2NoYWxsZW5naW5nDQpzaW5jZSBpdCBhbGxvY2F0 ZXMgYSBuZXcgYmxvY2suDQoNClRoYW5rcywNCi1Ub3NoaQpfX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fXwpMaW51eC1udmRpbW0gbWFpbGluZyBsaXN0CkxpbnV4 LW52ZGltbUBsaXN0cy4wMS5vcmcKaHR0cHM6Ly9saXN0cy4wMS5vcmcvbWFpbG1hbi9saXN0aW5m by9saW51eC1udmRpbW0K From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758766AbdEAQMU (ORCPT ); Mon, 1 May 2017 12:12:20 -0400 Received: from g4t3426.houston.hpe.com ([15.241.140.75]:40340 "EHLO g4t3426.houston.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751269AbdEAQMR (ORCPT ); Mon, 1 May 2017 12:12:17 -0400 From: "Kani, Toshimitsu" To: "dan.j.williams@intel.com" CC: "linux-kernel@vger.kernel.org" , "linux-nvdimm@lists.01.org" , "dave.jiang@intel.com" , "vishal.l.verma@intel.com" Subject: Re: [PATCH] libnvdimm: rework region badblocks clearing Thread-Topic: [PATCH] libnvdimm: rework region badblocks clearing Thread-Index: AQHSwa+nta9I7uFKMkmISr7SDbaEM6HfnXuAgAACnoCAAAJeAIAABYqA Date: Mon, 1 May 2017 16:12:13 +0000 Message-ID: <1493655131.30303.17.camel@hpe.com> References: <149355594185.9917.1577772489949690281.stgit@dwillia2-desk3.amr.corp.intel.com> <1493652871.30303.15.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.219.163.8] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AT5PR84MB0259;7:LsQ3G39nxa+mBJY5O8U+wwSgmjVQdoUrmjfdEEJrbAc7V1bjYUreNOlsS5duMl1IiKmWME7FQjFCOcWaWZdwvj5Y7ebtWKJk8RTTUrfx+ebgkgjAOt6ct1C1CSYHte/tavxy4m5BydDzvGgpwt+c76G0/pVzsoldKQdHrawRK1fYAraskgiMXhkfoUvGN9TKDpPVH0qM768/K7oI7P6Z7PtKfJ90n18+6rcIO1qOkCxmWhe4znmNIl34mFoq8w9WfcjHpl+vFW9VVIWdKsqOEXwx0RNTLbI+ffKgcpCH8//MZzjwKXTBDD4ukRF/hnOAXdU2/37gWDEzi/ozxIEcLg== x-ms-office365-filtering-correlation-id: 916e6508-78cc-4b27-683e-08d490acd462 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081)(201702281549075);SRVR:AT5PR84MB0259; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123560025)(20161123555025)(6072148);SRVR:AT5PR84MB0259;BCL:0;PCL:0;RULEID:;SRVR:AT5PR84MB0259; x-forefront-prvs: 02945962BD x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39450400003)(39840400002)(39410400002)(39850400002)(39400400002)(39860400002)(377424004)(377454003)(24454002)(93886004)(8936002)(25786009)(103116003)(2900100001)(76176999)(81166006)(102836003)(7736002)(6116002)(3846002)(2351001)(2906002)(36756003)(3280700002)(86362001)(3660700001)(33646002)(305945005)(53546009)(50986999)(54356999)(2950100002)(6916009)(8676002)(4326008)(189998001)(229853002)(6486002)(77096006)(54906002)(6506006)(110136004)(5660300001)(38730400002)(53936002)(6512007)(2501003)(5640700003)(478600001)(122556002)(6436002);DIR:OUT;SFP:1102;SCL:1;SRVR:AT5PR84MB0259;H:AT5PR84MB0260.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: MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 May 2017 16:12:13.7294 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR84MB0259 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 v41GFn0k002621 On Mon, 2017-05-01 at 08:52 -0700, Dan Williams wrote: > On Mon, May 1, 2017 at 8:43 AM, Dan Williams m> wrote: > > On Mon, May 1, 2017 at 8:34 AM, Kani, Toshimitsu > m> wrote: > > > On Sun, 2017-04-30 at 05:39 -0700, Dan Williams wrote: : > > > > > > Hi Dan, > > > > > > I was testing the change with CONFIG_DEBUG_ATOMIC_SLEEP set this > > > time, and hit the following BUG with BTT.  This is a separate > > > issue (not introduced by this patch), but it shows that we have > > > an issue with the DSM call path as well. > > > > Ah, great find, thanks! We don't see this in the unit tests because > > the nfit_test infrastructure takes no sleeping actions in its > > simulated DSM path. Outside of converting btt to use sleeping locks > > I'm not sure I see a path forward. I wonder how bad the performance > > impact of that would be? Perhaps with opportunistic spinning it > > won't be so bad, but I don't see another choice. > > It's worse than that. Part of the performance optimization of BTT I/O > was to avoid locking altogether when we could rely on a BTT lane > percpu, so that would also need to be removed. I do not have a good idea either, but I'd rather disable this clearing in the regular BTT write path than adding sleeping locks to BTT. Clearing a bad block in the BTT write path is difficult/challenging since it allocates a new block. Thanks, -Toshi