Received: by 2002:a05:7412:bc1a:b0:d7:7d3a:4fe2 with SMTP id ki26csp413450rdb; Sat, 19 Aug 2023 06:54:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFTR6alSdvhV5w3giXScgL9RG5bod2DbLs0wiU3IIiZPBPp/c2N+UuRLqKrIxtJb2lcx5qO X-Received: by 2002:a05:6a21:6da5:b0:133:6e3d:68cd with SMTP id wl37-20020a056a216da500b001336e3d68cdmr2978453pzb.3.1692453276048; Sat, 19 Aug 2023 06:54:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692453276; cv=none; d=google.com; s=arc-20160816; b=aRj6pyR96gqpsSjEAVHryN8AtO+aLgNKcJ1umKza/fcgqV+h7yKx0QwDNvAS3+TaPO tS2QAm/Fg5Qic1wIfrEqeze9V4z/nOJ3f0scIzsvyD+IrB6c+xTZHq/HtaVChy9OhSdL Aa5ag+18xIYikt/tdGTp5V4uxNNmHjPGsFPibIJ3f1D6YDFejcLI8YkZ4HVPZaOb2yem M5BH3s+SNIAd9ZHNxmi1o3q4TfM+CWu9myRrA2vmhhQCZvBUhqpEZPNG3PN6RsNScZyh 7V5Uqr2QQmoeYCh9hPF1ZeZiXGvsuIo67I2wk4nC8jHXLhQTruCCbOJ4InL51ZTULymJ jUaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:from:cc:to :content-language:user-agent:mime-version:date:message-id :dkim-signature; bh=WBbWFhxqqCcGSdxX6L9y8gpcH9P2VcnoWxvrGpmme/g=; fh=oYUIBS6dsOWaUse119LVbTIbyj/98jJj/iiBywRl/X8=; b=BMxed9kOsumNLw3ZkW6/K3hdkY/Sq/h3npujA4DvcMaSRA6kGHhSTKaFyfmuM1/dpZ DtN71dSWblYa8eD/phhPnqFwZKV/aVrHxW8JIWCJeDmO/jd6zlQr/A7y85lgax80HdjH eCmZaLV+CbVDT5F1vbMShGirYZj03yhPLwIjLJPmHhWFNw4gEShNAEIcwvFFQVLwF3ZM RZGaDocdAuiVgyurvzK1M3loXCQ97Glv/XHnxAEEVGuMts7L6dBBLWuvkjuq5PNtnfJ3 /dp62TnCe6VH+LdDTYe2MQV3I4DRL2dunTnqxHMWAkM2ZpokmouN+4OEOUkhD5uQ5xZf FC4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=L7NZ5l6x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id ce4-20020a056a002a0400b0068a0ca6b6e0si1080938pfb.398.2023.08.19.06.54.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Aug 2023 06:54:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=L7NZ5l6x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DC3DEB3A17; Sat, 19 Aug 2023 01:42:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243577AbjHPJ5U (ORCPT + 99 others); Wed, 16 Aug 2023 05:57:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236747AbjHPJ4t (ORCPT ); Wed, 16 Aug 2023 05:56:49 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A019CC1 for ; Wed, 16 Aug 2023 02:56:48 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-53482b44007so3742946a12.2 for ; Wed, 16 Aug 2023 02:56:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692179808; x=1692784608; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=WBbWFhxqqCcGSdxX6L9y8gpcH9P2VcnoWxvrGpmme/g=; b=L7NZ5l6xxSfCK6y8MCFY/pEyDTkmWjQSrQCriAsKuhTsoVHCwkaMNEIDDVP5YYvqWX bHxajzgVqykRTEfRlBynFp7azUVjqBaHiHD0WAkTWOtok7Jhj+hdq+ykMUzINmANvr0k wsilIupRWQhh1eVgUSJ2QT/0c9uxnWBp+UvftskPPxnHXUooyizN78lFjfwXFK9r0HSw SQfL7NWliXxvSACCEdcSYCVz5CKKIxORJb7RMU4XaafrgCDFdDqZbDsSv4O6yfhgdB8C 1SpUKikNr/7eB0Ni9LVke+5aCY2j4nz4LLalS91BhGhPHhvm2xrTfrxJLKx8ItxnEv5i YV2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692179808; x=1692784608; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=WBbWFhxqqCcGSdxX6L9y8gpcH9P2VcnoWxvrGpmme/g=; b=CWriQUTJCj3rAFyH9GRGpVCt5XHt44QEaMxqJmxcys6BWC6OSQGzCd7G+CwEiaJanT z2rRDUk5NWve/3G/3sNt5ssiskc0AHrJAnY9e+WxmHlMeUT92X6UfWzgPHbbt1lfxHFa qIaAEfK9bawZpxvbkpTJBSsvJH+NMAJ8zlmhjphz9WYDYbGWPTnzRYO6g3sT14ddsEgP 55a+PHfR+D+XfH3B2hJxxlPBIJE3ZRgqRX85T/r4dxYVq7MTs4Cdql0UIm6DJvpio5dm 0uTpxGWdFZVLtSdLud+UfhbOITvN2jzsVUCNiLXxPvZzdwpJmprZkB0SLR8nl90yHSn2 YO5Q== X-Gm-Message-State: AOJu0YzNuw/X2NAHUz/m+64NF/M3kUKM41xDOzxLSADkHWVvBI6nsseN BtknpKx387tAhONHHS6/WzI= X-Received: by 2002:a17:90a:e004:b0:269:21ad:bdec with SMTP id u4-20020a17090ae00400b0026921adbdecmr904692pjy.28.1692179808036; Wed, 16 Aug 2023 02:56:48 -0700 (PDT) Received: from [192.168.0.105] ([103.124.138.83]) by smtp.gmail.com with ESMTPSA id j6-20020a17090a31c600b00267eead2f16sm11610829pjf.36.2023.08.16.02.56.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Aug 2023 02:56:47 -0700 (PDT) Message-ID: <44f5a8f7-0bf4-c986-a0dc-dc12d0cb30ca@gmail.com> Date: Wed, 16 Aug 2023 16:56:44 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Content-Language: en-US To: Richard Weinberger , Miquel Raynal , Vignesh Raghavendra , Zhihao Cheng Cc: Linux MTD , Linux Kernel Mailing List From: Bagas Sanjaya Subject: Fwd: ubi: fastmap: Fix a series of wear leveling problems Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I notice a bug report with proposed fixes on Bugzilla [1]. Quoting from it (only the first problem that is quoted): > Problem 1: large erase counter for single fastmap data PEB > > Config: > x86_64 qemu > flash: nandsim > CONFIG_MTD_UBI_WL_THRESHOLD=128 > CONFIG_MTD_UBI_FASTMAP=y > ubi->beb_rsvd_pebs=0 > > Running fsstress on ubifs for 3h(fastmap data PEB has large erase counter than others): > ========================================================= > from to count min avg max > --------------------------------------------------------- > 0 .. 9: 0 0 0 0 > 10 .. 99: 532 84 92 99 > 100 .. 999: 15787 100 147 229 > 1000 .. 9999: 64 4699 4765 4826 > 10000 .. 99999: 0 0 0 0 > 100000 .. inf: 1 272935 272935 272935 > --------------------------------------------------------- > Total : 16384 84 180 272935 > PEB 8031(ec=272935) is always taken for fastmap data. > > After fix, running fsstress on ubifs for 12h(no pool reservation), no individual peb has big erase counter: > ========================================================= > from to count min avg max > --------------------------------------------------------- > 0 .. 9: 0 0 0 0 > 10 .. 99: 0 0 0 0 > 100 .. 999: 16320 609 642 705 > 1000 .. 9999: 0 0 0 0 > 10000 .. 99999: 64 18176 18234 18303 > 100000 .. inf: 0 0 0 0 > --------------------------------------------------------- > Total : 16384 609 710 18303 See Bugzilla for the full thread (with other problems mentioned) and attached patch series that fixes them. Zhihao: I asked you on BZ to send your patches to linux-mtd list, but you didn't respond there. Would you like to send them for review? Thanks. [1]: https://bugzilla.kernel.org/show_bug.cgi?id=217787 -- An old man doll... just what I always wanted! - Clara