Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3150887rwb; Tue, 8 Nov 2022 00:52:50 -0800 (PST) X-Google-Smtp-Source: AMsMyM5L1Q+ZcwQKhMnDXmpugdqkbGFP+uNlCOaxPMfee8Ggp0bMronAkqo/KLNnVkywoAMCed1a X-Received: by 2002:a05:6402:3709:b0:459:279e:fdc6 with SMTP id ek9-20020a056402370900b00459279efdc6mr55335433edb.338.1667897569810; Tue, 08 Nov 2022 00:52:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667897569; cv=none; d=google.com; s=arc-20160816; b=blXa+et/TmGMBdWvqPmzyf5er5vbGLkZg4mN5tcV5UdYd3OyGq2xWxpl2ijKjRIRQ4 Tn4SeFQCFYGJj5qCrqIHO+df+HX5i1jpq643GajWf2DJhQAnsfA9DzTpJGTd1gDDRBrd D1CZymalbzUwd6tyiKZUndueI0ddA+GWMeoE1kGrBRb/B6wP+JpwPyZ2C2ayLLkvwkKE Ja3jMxSLDMxvoLzlpjmjQO7U9C8+QpE6/9aQjxGVIKeXUT+OT3cdps+Hv1bPqkNurN3W G+AY0Dnv0E7AeqKjG6awa3QnMyHVeMS1rw6ySA//7NcJbRs4a4J1MI0NAsXBmqj3YnoJ WmEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:references :in-reply-to:mime-version:dkim-signature; bh=IDSxmG3m638MABvgT+8t12DDOEuynk9T2/0gjTewfik=; b=cJ0DcbZrP0LfPT/kaorPHe5YvBj7TZdh4I/SzOGAl0AXs5rajUZnWgLoRYv+O/xz6P EN2mXnSw4KIioQmasb3gVkDSeiilnCHy5Uol44J+DxPTwMwlDUWr7B6wg9XpvvQq9oqx mVaYOLgNjXt/PQkqXiyKdpbZ8pbnHGTZS+9S5MEiPt6ZyohGclippebfHoAU5bbre5xj EKx6PFP9YGzGRCdmCgkSdmmmljLz3yttD3XWeyKXwmR8dzDx9+ZARk2jvnJoVvpPS5Kj vif+gFAek6fkKLgy4X01BT+kUqtK6qpXvIXJSXiNroq/6OWIu3x5lf9c8bu3BfTCAQcO w6FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DHpRakWE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm5-20020a170907948500b007a44a13536bsi12624832ejc.243.2022.11.08.00.52.26; Tue, 08 Nov 2022 00:52:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DHpRakWE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233710AbiKHIA5 (ORCPT + 90 others); Tue, 8 Nov 2022 03:00:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233416AbiKHIA4 (ORCPT ); Tue, 8 Nov 2022 03:00:56 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4557266C; Tue, 8 Nov 2022 00:00:54 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id BFB6DCE182D; Tue, 8 Nov 2022 08:00:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0896C433D7; Tue, 8 Nov 2022 08:00:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667894450; bh=WS7VySlUdeH9Vo/Jrl2Tr9JnjBxYq5+stEtO8WAKYbc=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=DHpRakWEwcdzJQp3GYA+jzD/U477wP8wgEiCqZ1wsHF2PymZcIUJGvMISuRGCbKUZ 42SbwdqMyNYRv6YjYxJCCoCo3gR+0k16GT/6Ag5RE+wrW0/z9xy+X/p+YV5bLoy/Yu l4ROWhjmQ5m1YXofNrcqKeegcFy4lHf4YQqEWnO+4ZLJJ4L2YscxtJ3jKr5skIS8Lf wQtfKHslzs+YT0YvATfk/8qJvvU0Su6Jl6XMcys/WFHC4pvGKctGj22vASm+eHbxQN LiXydSiNy8xiJo+J73/tPfDzHSdv40gQ/6sAQSKyJznvsblAjm/ariz7bZxXkQn+Es TNUvDWzeFpMIw== Received: by mail-oi1-f174.google.com with SMTP id l127so14754683oia.8; Tue, 08 Nov 2022 00:00:50 -0800 (PST) X-Gm-Message-State: ACrzQf1Dlza+Hjws2iA8T3MoBwPZep6xuLpxeN+te5i98Q6t9DC83JP+ RqptuFOTTOJK/jl6Ad38faqjgNuv5p8rEWO/Xn8= X-Received: by 2002:a54:4789:0:b0:359:f549:99ff with SMTP id o9-20020a544789000000b00359f54999ffmr28015428oic.257.1667894449963; Tue, 08 Nov 2022 00:00:49 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:6839:1a4e:0:0:0:0 with HTTP; Tue, 8 Nov 2022 00:00:49 -0800 (PST) In-Reply-To: References: From: Namjae Jeon Date: Tue, 8 Nov 2022 17:00:49 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 2/2] exfat: hint the empty entry which at the end of cluster chain To: "Yuezhang.Mo@sony.com" Cc: Sungjong Seo , linux-kernel , linux-fsdevel , "Andy.Wu@sony.com" , "Wataru.Aoyama@sony.com" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 2022-11-02 16:11 GMT+09:00, Yuezhang.Mo@sony.com : > After traversing all directory entries, hint the empty directory > entry no matter whether or not there are enough empty directory > entries. > > After this commit, hint the empty directory entries like this: > > 1. Hint the deleted directory entries if enough; > 2. Hint the deleted and unused directory entries which at the > end of the cluster chain no matter whether enough or not(Add > by this commit); > 3. If no any empty directory entries, hint the empty directory > entries in the new cluster(Add by this commit). > > This avoids repeated traversal of directory entries, reduces CPU > usage, and improves the performance of creating files and > directories(especially on low-performance CPUs). > > Test create 5000 files in a class 4 SD card on imx6q-sabrelite > with: > > for ((i=0;i<5;i++)); do > sync > time (for ((j=1;j<=1000;j++)); do touch file$((i*1000+j)); done) > done > > The more files, the more performance improvements. > > Before After Improvement > 1~1000 25.360s 22.168s 14.40% > 1001~2000 38.242s 28.72ss 33.15% > 2001~3000 49.134s 35.037s 40.23% > 3001~4000 62.042s 41.624s 49.05% > 4001~5000 73.629s 46.772s 57.42% > > Signed-off-by: Yuezhang Mo > Reviewed-by: Andy Wu > Reviewed-by: Aoyama Wataru Applied. Thanks for your patch!