Received: by 10.223.185.116 with SMTP id b49csp4513822wrg; Tue, 6 Mar 2018 17:58:50 -0800 (PST) X-Google-Smtp-Source: AG47ELsx216ge7eLGXqQS93AYLYqzCeM7e90jA1pk+DZ/+FWfU0p/5IkOyQjTqFk/uuKw4LwF50E X-Received: by 10.98.133.193 with SMTP id m62mr20828949pfk.74.1520387929921; Tue, 06 Mar 2018 17:58:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520387929; cv=none; d=google.com; s=arc-20160816; b=pL6PcT5w77TG9IX8/VnFrfyzvFeHEkNaaW+TP6ds6OfmlXLW84zpAJVpqikIyv+D2p +faYWYPxIDTLtQmuTH+/OJ9l2gyHRNDV+rwfK/n9Jj+iIpZQZ0bdLEufsK6n9gNq/JKS Wt3UAzvcdlOqBDssodRf1/h5EhYlctESc5sgfKUqvicmMAmwxyoLG6tlyrb5WnS/BPxE gvkFaJm6QQOjI5jKrmRo07uliXlrrs9AILuCrOkdPDlM8++bKVYgVs+CwolxtRFUI5iD xplfFGMFgnyoTrfsO/RRqlw6M1e1pSW1ODjLnuF72rigbhdArPN57qjSjv3W5FPanroI tAmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:mime-version:user-agent:date :message-id:to:organization:from:references:cc:subject :arc-authentication-results; bh=U1Xp0UF9N8kLZ1t9cbVstb1XyV1cWvJ5k5eZsgJ22ug=; b=vsux+hVcXisH8ZWb5IqX3kBfsAGueny43Xk9Zj5zGT+dJIl1kYTQL5KoXUS8feuuhz m3jsEVbDQDTlfb4aCFaRxdWPZxDgHtTCeGAiAjPa+Xvw8ycCSXPzDaUOm7toMOw+r3HO QxaMrhMCN/KybBZ/gQfLsXOKtwbnqB0hrCctCT1XhkUsDqQd6dWoUvMVsZwnJZPsM663 PAo5Q72M71L42voonZ3K/OsGURsjB747uJkhmrOQqjZv12n3dSTcqLm3L2VxzsHow7iu gcepsj+Y1r6nY1PAb3EBPMPaBDscz4wSdRryIZULmLnpU73UURuVM57fGBbDj7ZKhIf8 OrWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e20si2857456pfi.359.2018.03.06.17.58.35; Tue, 06 Mar 2018 17:58:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933100AbeCGB5i (ORCPT + 99 others); Tue, 6 Mar 2018 20:57:38 -0500 Received: from lilium.sigma-star.at ([109.75.188.150]:58394 "EHLO lilium.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932078AbeCGB5h (ORCPT ); Tue, 6 Mar 2018 20:57:37 -0500 Received: from localhost (localhost [127.0.0.1]) by lilium.sigma-star.at (Postfix) with ESMTP id CE630181A43E4; Wed, 7 Mar 2018 02:57:35 +0100 (CET) Subject: Re: [PATCH] ubi: Reject MLC NAND Cc: Pavel Machek , Richard Weinberger , boris.brezillon@free-electrons.com, dedekind1@gmail.com, tharvey@gateworks.com, linux-kernel@vger.kernel.org, stable@vger.kernel.org, marek.vasut@gmail.com, cyrille.pitchen@wedev4u.fr, computersforpeace@gmail.com, dwmw2@infradead.org References: <20180303104554.5958-1-richard@nod.at> <20180306231805.GA28183@amd> From: David Oberhollenzer Organization: sigma star gmbh To: linux-mtd@lists.infradead.org Message-ID: Date: Wed, 7 Mar 2018 02:57:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180306231805.GA28183@amd> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="VJf6WKdm3rDswI30wYXg6zdsyWkB3QgH2" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --VJf6WKdm3rDswI30wYXg6zdsyWkB3QgH2 Content-Type: multipart/mixed; boundary="fQ0ClPwfwkUs8jTBCVa8trd4qWVAOb8vp"; protected-headers="v1" From: David Oberhollenzer To: linux-mtd@lists.infradead.org Cc: Pavel Machek , Richard Weinberger , boris.brezillon@free-electrons.com, dedekind1@gmail.com, tharvey@gateworks.com, linux-kernel@vger.kernel.org, stable@vger.kernel.org, marek.vasut@gmail.com, cyrille.pitchen@wedev4u.fr, computersforpeace@gmail.com, dwmw2@infradead.org Message-ID: Subject: Re: [PATCH] ubi: Reject MLC NAND References: <20180303104554.5958-1-richard@nod.at> <20180306231805.GA28183@amd> In-Reply-To: <20180306231805.GA28183@amd> --fQ0ClPwfwkUs8jTBCVa8trd4qWVAOb8vp Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 03/07/2018 12:18 AM, Pavel Machek wrote: > Now... Yes, handling flash is hard, MLC NAND is worst of the > bunch. But... >=20 MLC is not just more flimsy than SLC NAND. The real problem is that on MLC NAND, pages come in pairs. Multiple voltage levels inside a single, physical memory cell are used to= encode more than one bit. Instead of just having pages that are twice as = big, the flash exposes them as *two different pages*. Those pages are usually = not ordered sequentially either, but according to a vendor/device specific pairing scheme. > Read disturb is not unique to MLC, right? Happens to all the flashes, > its just that MLC has tighter margins for error. >=20 You don't just have more read disturb on a single page. Reading one page will also affect the paired page as well.[0] In addition to that, you also have program disturb. Even *writing success= fully* to the upper page of a pair also causes bit flips on the lower one, affec= ting completely different data.[0] This could be addressed using the experimental ubihealthd that crawls the= flash from time to time (at UBI level), making UBI notice and fix bit flips.[0]= > Power-cut. UBIFS is just not power-cut safe, right? My notes say that > power-cut during erase could result in flash that contains all 1s, but > will start showing errors very quickly. Again, not MLC specific. Can > be solved with battery... >=20 > (And yes, there are some problems specific to MLC, where parts of page > need to be written in specific order. Not sure how it affects > ubifs. But it was not listed as a reason for the patch.) >=20 Both UBI and UBIFS were designed to be power cut tolerant.[1] On MLC however, if you interrupt a write access to the upper page of a pa= ir, you will also corrupt the lower one, i.e. *data that was already written*= , which is a serious issue.[0] Richard and Boris did spend a lot of time working on a solution for that = at UBI level which would currently still require a lot of testing and fine tuning, but sadly we ran out of budget. The proposed patch tries to prevent further bad surprises for people who = try to use UBI and UBIFS on top of MLC by making sure that UBI _refuses_ to r= un on MLC (at least for now). Regards, David [0] http://linux-mtd.infradead.org/doc/ubifs.html#L_ubifs_mlc [1] http://linux-mtd.infradead.org/doc/ubifs.html#L_powercut --fQ0ClPwfwkUs8jTBCVa8trd4qWVAOb8vp-- --VJf6WKdm3rDswI30wYXg6zdsyWkB3QgH2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEEwY/cjyeWErqzVubvOXcPHQaAtEFAlqfRwYACgkQvOXcPHQa AtGUnAf/akx6/qBxZYbO6ODBoH4M7ULAPQVd2k2esYpHRWjjroJJTiD7TEd6phTD Y4Bubdf1FaqRI8kSGDYLFdSMhBUjtWYJucPJmjImBnvjubS++SybjO7lSi4y6HMw ndzaHb1OwbuBAASwBrNuwqYsuIbLWHxNOWtxzJHo8iv46Gd3MPY0xBocerbR8n+A qjXN55CWa1huLiHNg7pp4zPpTW24eiEnJBLhqa/AWCM8lUXfXRnqF69rNr7mc6Y5 ZQxWi5TqZrNqKipQFS1KJ11gslQc4bJ8QYmeaAE9NBC3vMxggSTUveJQXMO3d5sE W/EFXCjgPdzjZRX1WkODjmtKOevyxg== =JTRb -----END PGP SIGNATURE----- --VJf6WKdm3rDswI30wYXg6zdsyWkB3QgH2--