From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 309B6C432BE for ; Sun, 29 Aug 2021 14:26:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1864B60F44 for ; Sun, 29 Aug 2021 14:26:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235452AbhH2O0v (ORCPT ); Sun, 29 Aug 2021 10:26:51 -0400 Received: from mail-0201.mail-europe.com ([51.77.79.158]:44551 "EHLO mail-0201.mail-europe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235474AbhH2O0u (ORCPT ); Sun, 29 Aug 2021 10:26:50 -0400 Date: Sun, 29 Aug 2021 14:25:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1630247126; bh=mmvKLlJPwn9FE9InvpVbvMOjd3dA4r2TNeQ84ldrtFI=; h=Date:To:From:Cc:Reply-To:Subject:From; b=CvYtHRSJPLZiFuRT76fuio4eRcgjMXkEd4Fa+lPpSRXCZ/kRuvkI5Q8UeW/VxTtdC MAcEFqObDvcAHp7O8BOFm7202QgZORZpocJxuhm0qc+9YsYIJtFiUl2/lwe1mhS1xg 5On5+IOEWRvvwlYN85cVSP3s6+WddHW8nU+1Dcbo= To: hirofumi@mail.parknet.co.jp From: "Caleb D.S. Brzezinski" Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, "Caleb D.S. Brzezinski" Reply-To: "Caleb D.S. Brzezinski" Subject: [PATCH 0/3] fat: add a cache for msdos_format_name() Message-ID: <20210829142459.56081-1-calebdsb@protonmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Hi all, This patch series adds a cache for the formatted names created by msdos_format_name(). In my testing, it resulted in approximately a 0.2 ms decrease in kernel time for listing a small directory. The overhead is in memory, but each entry is only 25 bytes plus sizeof(struct hlist_node), and the cache also actively collects infrequently used nodes, keeping overall memory usage low. Caleb D.S. Brzezinski (3): fat: define functions and data structures for a formatted name cache fat: add the msdos_format_name() filename cache fat: add hash machinery to relevant filesystem operations fs/fat/namei_msdos.c | 140 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) base-commit: 85a90500f9a1717c4e142ce92e6c1cb1a339ec78 --=20 2.32.0