From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from a.ns.miles-group.at ([95.130.255.143] helo=radon.swed.at) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YdjKI-0005Ya-Cw for linux-mtd@lists.infradead.org; Thu, 02 Apr 2015 17:54:47 +0000 Message-ID: <551D824D.3000004@nod.at> Date: Thu, 02 Apr 2015 19:54:21 +0200 From: Richard Weinberger MIME-Version: 1.0 To: Andrea Scian Subject: Re: [PATCH 4/4] UBI: Implement bitrot checking References: <1427631197-23610-5-git-send-email-richard@nod.at> <551D7DB4.9010607@dave-tech.it> In-Reply-To: <551D7DB4.9010607@dave-tech.it> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: boris.brezillon@free-electrons.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, dedekind1@gmail.com List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi! Am 02.04.2015 um 19:34 schrieb Andrea Scian: > > Richard, > > Il 29/03/2015 14:13, Richard Weinberger ha scritto: >> + mutex_lock(&ubi->buf_mutex); >> + err = ubi_io_read(ubi, ubi->peb_buf, e->pnum, 0, ubi->peb_size); >> + mutex_unlock(&ubi->buf_mutex); >> + if (err == UBI_IO_BITFLIPS) { >> + dbg_wl("found bitflips in PEB %d", e->pnum); >> + spin_lock(&ubi->wl_lock); >> + > > IIUC you trigger the action as soon as you have a bitflip error, is this > correct? I trigger it as soon UBI sees the bitflip. This depends on the configured MTD bitflip_threshold. > Isn't this too much conservative? You usually have a RBER on MLC devices > that's between 1E-7 (for brand new devices) and 1E-4 (for devices with > 1k-2k P/E cycle after 100k-300k read-without-P/E) > > Having a few bitflips on a block read is more that usual and current ECC > can correct more that 16 bit error over 512/1KiB. Please see above. :) Thanks, //richard From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753338AbbDBRy0 (ORCPT ); Thu, 2 Apr 2015 13:54:26 -0400 Received: from a.ns.miles-group.at ([95.130.255.143]:65275 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752657AbbDBRyY (ORCPT ); Thu, 2 Apr 2015 13:54:24 -0400 Message-ID: <551D824D.3000004@nod.at> Date: Thu, 02 Apr 2015 19:54:21 +0200 From: Richard Weinberger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Andrea Scian CC: linux-mtd@lists.infradead.org, boris.brezillon@free-electrons.com, linux-kernel@vger.kernel.org, dedekind1@gmail.com Subject: Re: [PATCH 4/4] UBI: Implement bitrot checking References: <1427631197-23610-5-git-send-email-richard@nod.at> <551D7DB4.9010607@dave-tech.it> In-Reply-To: <551D7DB4.9010607@dave-tech.it> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! Am 02.04.2015 um 19:34 schrieb Andrea Scian: > > Richard, > > Il 29/03/2015 14:13, Richard Weinberger ha scritto: >> + mutex_lock(&ubi->buf_mutex); >> + err = ubi_io_read(ubi, ubi->peb_buf, e->pnum, 0, ubi->peb_size); >> + mutex_unlock(&ubi->buf_mutex); >> + if (err == UBI_IO_BITFLIPS) { >> + dbg_wl("found bitflips in PEB %d", e->pnum); >> + spin_lock(&ubi->wl_lock); >> + > > IIUC you trigger the action as soon as you have a bitflip error, is this > correct? I trigger it as soon UBI sees the bitflip. This depends on the configured MTD bitflip_threshold. > Isn't this too much conservative? You usually have a RBER on MLC devices > that's between 1E-7 (for brand new devices) and 1E-4 (for devices with > 1k-2k P/E cycle after 100k-300k read-without-P/E) > > Having a few bitflips on a block read is more that usual and current ECC > can correct more that 16 bit error over 512/1KiB. Please see above. :) Thanks, //richard