Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1563893imm; Sun, 23 Sep 2018 06:50:16 -0700 (PDT) X-Google-Smtp-Source: ACcGV63XDuafEtL2X4w6cV88C1el2b4avE05FMU73f3XgtsCvOm3tUATYey8O0zedVWIooRd+Dwn X-Received: by 2002:a17:902:1025:: with SMTP id b34-v6mr6809971pla.201.1537710616504; Sun, 23 Sep 2018 06:50:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537710616; cv=none; d=google.com; s=arc-20160816; b=rtZPwUba7dF3vd0anW3qhJb0QmN9pGfN7WLHWiNEYdpxsRFVPe6ynpuRuY5HPGVk3u UAWZojRwjC6ARhM2YD/eL/3m6ig2U//BUvmPBjyQoCAl0x2N+hQdKso853QWWUwWd2Ls TaZuYvL7xZ0ilKzx9NchDXOedlZxlsfbtlHyIvptb3IK/l35u+98yR95QAlLLz6W26rc AMMSVnZRXZ/Koxe/6sela6UdM9oy0youyyLQwRPheg/QvJJPUa6uD8DG9x/Vt0YBuVq2 r7D7V+7opKghwpC9eLBwJeAxjZZ9AquWmv47B7NZXUh6PAh4vC0DwSgXEGPi4uKZbz+1 5iWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=rKAJg5t3pbkKEc1clO1zASicptBCjIlapThmeObdAKs=; b=IlqA9pah7IIehzj9ONnk/lYMfr1qMN38XzAxyrccdlugc6jG6dL2n3jBRsbGp1oCWX 6sVQZlbtPXOf8nYUSFJNo0Mmp8ZHDk3BQ4NH1JvcFyGMEHhwgRiMMqPLqfNdyta1vU5k N/mC3slMnIj+T4cgM5NaISxMnC1FAGImwVAV3lYOfcPFLj7dBH++jl/iLg3KNSj4ixf6 rK7ff77dGsVsUy4KhGDfNtFJrk27kQxjQBuMOmFLj5I2YR0CMoP135nSyoT2XHy5/RUO fPjpyNaWpk44++xaSpJsNO96MypncTPIvfFDeXK7lFUemUV4rcFqbcF+u/vGJRr0BB8K meXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bofh-nu.20150623.gappssmtp.com header.s=20150623 header.b=0HHQd7tS; 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 75-v6si1755901pfy.169.2018.09.23.06.50.00; Sun, 23 Sep 2018 06:50:16 -0700 (PDT) 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; dkim=pass header.i=@bofh-nu.20150623.gappssmtp.com header.s=20150623 header.b=0HHQd7tS; 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 S1726227AbeIWTr1 (ORCPT + 99 others); Sun, 23 Sep 2018 15:47:27 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:40371 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726071AbeIWTr1 (ORCPT ); Sun, 23 Sep 2018 15:47:27 -0400 Received: by mail-ot1-f66.google.com with SMTP id g14-v6so3799023otj.7 for ; Sun, 23 Sep 2018 06:49:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bofh-nu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rKAJg5t3pbkKEc1clO1zASicptBCjIlapThmeObdAKs=; b=0HHQd7tSH6RLhxan3Y1Umv2nYE0l/hAL1HXnP3QqnO0kqWiEVvsvDsn9r17JVfxsRs +yxKQvbWb9w6X+61IVKcRFP71nA07qL246ATcTo6ht8VEA8omhaSQMYAIxWiBKVj6oH0 8YSkOk95QpwLHI+HIEJfeKRCeJ0KPEJ/35qwdZcpuXVuqGurgR2KA3XEUiRYhwc5Wo6S A1Fja8Nm/CcTEcJptGjZv6RnxtveHwb5W1N3wqPxyxT27oLUCh99OaMaGu+cyt5Je/dC 8lLqdlprZK0fy5NpQSC5Pg2n5E8YB0iIBqGmoyWk6eT4owBvsOZTY2489yjZUrXNWQVh qmrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rKAJg5t3pbkKEc1clO1zASicptBCjIlapThmeObdAKs=; b=FEabG86b6CNn166jmxglVnQB8ek6CYAK7cabIzukeLmqu9x/Su//Qocc3IGPeGp3xB m8vx3LvfEYhxPDerv1NO4adwXb90VNYOlh47ttk6ZeqSv2JQJ/KnCLmBClEOpNB2bnBa /bygf/NVYjViBTxKhVYAm5bw3IKk/n9qDctZptFyqf60ewH2MSyFs8Ky2CQgNijCgNcn 7yh9zjWa1LtixV2tGpFl6MDdF14FAH0y+hpPejjHrMSLyf/46ZQrDS5oYSXIZrirCJ4D 3rpBegaS6IRPI/JbwRBmf3A8KzxRjCAgO8HflihEZOcgzU96D8++JlQHTzqFHkjsxszU F4vA== X-Gm-Message-State: ABuFfogl/IVNXylMxIYwm9ihnK/u+2rlL9SHLUj0jdhOBmAFa/VhVJ9U EkaUVSSyoPlPuMtCEaudkTmmZ5zR7gl//bqwuRQTSQ== X-Received: by 2002:a9d:4a14:: with SMTP id h20-v6mr2808332otf.160.1537710593973; Sun, 23 Sep 2018 06:49:53 -0700 (PDT) MIME-Version: 1.0 References: <20180701160757.138608453@linuxfoundation.org> <20180701160759.928145668@linuxfoundation.org> <2076412.mQRaXglRsh@blindfold> In-Reply-To: <2076412.mQRaXglRsh@blindfold> From: Lars Persson Date: Sun, 23 Sep 2018 15:49:42 +0200 Message-ID: Subject: Re: [PATCH 4.9 069/101] ubi: fastmap: Correctly handle interrupted erasures in EBA To: richard@nod.at Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Martinbayern@outlook.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 23, 2018 at 2:58 PM Richard Weinberger wrote: > > Lars, > > Am Sonntag, 23. September 2018, 14:49:23 CEST schrieb Lars Persson: > > On Sun, Jul 1, 2018 at 6:27 PM Greg Kroah-Hartman > > wrote: > > > > > > 4.9-stable review patch. If anyone has any objections, please let me know. > > > > > > ------------------ > > > > > > From: Richard Weinberger > > > > > > commit 781932375ffc6411713ee0926ccae8596ed0261c upstream. > > > > > > Fastmap cannot track the LEB unmap operation, therefore it can > > > happen that after an interrupted erasure the mapping still looks > > > good from Fastmap's point of view, while reading from the PEB will > > > cause an ECC error and confuses the upper layer. > > > > > > Instead of teaching users of UBI how to deal with that, we read back > > > the VID header and check for errors. If the PEB is empty or shows ECC > > > errors we fixup the mapping and schedule the PEB for erasure. > > > > > > Fixes: dbb7d2a88d2a ("UBI: Add fastmap core") > > > Cc: > > > Reported-by: martin bayern > > > Signed-off-by: Richard Weinberger > > > Signed-off-by: Greg Kroah-Hartman > > > > > > > > Hi Greg > > > > This commit belongs to a series of 3 commits that are intended to be > > used together. Currently the stable branches have only the first > > commit from the series and we get a UBI speed regression because an > > extra NAND page read is always performed for each access to a UBI LEB. > > > > 3e5e4335cc0ffd668054564b113fb3c9c97badb8 ubi: fastmap: Detect EBA > > mismatches on-the-fly > > 34653fd8c46e771585fce5975e4243f8fd401914 ubi: fastmap: Check each > > mapping only once > > 781932375ffc6411713ee0926ccae8596ed0261c ubi: fastmap: Correctly > > handle interrupted erasures in EBA > > > > This will in turn require also this follow-up patch: > > 25677478474a91fa1b46f19a4a591a9848bca6fb ubi: Initialize Fastmap > > checkmapping correctly > > Wait. > Commit 34653fd8c46e771585fce5975e4243f8fd401914 was not scheduled for stable > on purpose. > It is just an optimization. How much is the performance regression you see? > Commit 3e5e4335cc0ffd668054564b113fb3c9c97badb8 does not fix anything, all it > does is adding another paranoia check to UBI. > > I'd appreciate if you would come up with regression reports on linux-mtd first > before asking Greg to pick patches up... > Hi Richard Sorry, I assumed this omission from -stable was a mistake. The timing for our boot increased from 45 seconds to 55 seconds on one chip and 42 seconds to 48 seconds on another chip. The regression was completely fixed by applying the extra patches. The way I see it the first patch is a significant slow-down so the second patch is required to restore performance. - Lars