From patchwork Tue Feb 13 21:37:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13555680 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D08AC4829A for ; Tue, 13 Feb 2024 21:37:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C93CD6B0080; Tue, 13 Feb 2024 16:37:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C44376B0082; Tue, 13 Feb 2024 16:37:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B0BF26B0085; Tue, 13 Feb 2024 16:37:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 9D8386B0080 for ; Tue, 13 Feb 2024 16:37:26 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 6AD84160D3D for ; Tue, 13 Feb 2024 21:37:26 +0000 (UTC) X-FDA: 81788092092.17.57A59B6 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf20.hostedemail.com (Postfix) with ESMTP id 7F75E1C0022 for ; Tue, 13 Feb 2024 21:37:24 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=OWJepqos; spf=pass (imf20.hostedemail.com: domain of cel@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=cel@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707860245; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=RcHq7wUhsNRmQ1tsXIqBd79ubl1rsFbYeZOqjkoV5BU=; b=AMqwsKmapSKltPjA5AgQfWJ4EfL3ihfkm89MiCYqMmimv21uP8yQHdNGXRxZhggq7u8/Pq VnjlEdA9vOxSrB5qdJtHqkkLmvVNsHqmWc2WF40NVViCaKO5RiaS2Yvl34h0ZSZDFnMpKH TDeesRpKVK+qcfXluYzsJNwsd3ZDYhA= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707860245; a=rsa-sha256; cv=none; b=HIB8bnoWsC28IOu3pysV7e5wduFQKOsWiI4myw/xOhSxvqa7Q66iRtlSr+lq7tGzqJLv55 m1pFFPOuDSIlJ3lYKWN8xLWXjOWFJzwW+NHzIBT96n8hfL4iNth+4Dsao6gCDhA6uCVDae bMlf+o+G0LfRqoAokbeeWFHKXfaVj6E= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=OWJepqos; spf=pass (imf20.hostedemail.com: domain of cel@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=cel@kernel.org; dmarc=pass (policy=none) header.from=kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id B24ADCE1F32; Tue, 13 Feb 2024 21:37:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F12E5C433C7; Tue, 13 Feb 2024 21:37:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707860240; bh=iZuJJf2L4A/9BC89nmeB2uDzQCKPBrFKPnqEznO8JRo=; h=Subject:From:To:Cc:Date:From; b=OWJepqosehGJPEZO9d/bePFqq3qbGgUjY6fPdj83QbSZf8s2XoJbVbgneG20oEQAz GxrRDaga5RZZ+TC0H73HccGqy8D4/HeGvSDSXa7ziV7gJpNk5HsxiunstM6tJZwErf y8U4X+oboJmNthftzoEtEFU3UUu9K+8eFqsNV5lp/ApXH58N+h7hUYBN07bQHJyqNz NbYCkRe5fJ2B0ILcMqPjmuAeNVlEORLvikJXZcyf0/eRVMS2VMjzQM75r50SY7rcTx ISJfFK+/0E2ob1Tt+Z8zCOTYh5iFXWRMoW8JJLll9Qa6RZDM91txTIfemPmv4EAFpg ncWwNqsHnQnKA== Subject: [PATCH RFC 0/7] Use Maple Trees for simple_offset utilities From: Chuck Lever To: viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz, hughd@google.com, akpm@linux-foundation.org, Liam.Howlett@oracle.com, oliver.sang@intel.com, feng.tang@intel.com Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, maple-tree@lists.infradead.org, linux-mm@kvack.org, lkp@intel.com Date: Tue, 13 Feb 2024 16:37:17 -0500 Message-ID: <170785993027.11135.8830043889278631735.stgit@91.116.238.104.host.secureserver.net> User-Agent: StGit/1.5 MIME-Version: 1.0 X-Rspamd-Queue-Id: 7F75E1C0022 X-Rspam-User: X-Stat-Signature: rjrwheu93f7wbb4wjtt44wbe1j8xrj9n X-Rspamd-Server: rspam03 X-HE-Tag: 1707860244-841226 X-HE-Meta: U2FsdGVkX1+dfvC0btN7PmHs1Pdd6I5mFRwFM0AKt8c5GEy0ZZW7uMpRooQVBRjkTQ8eQhgRbG3FDuEHCkSCO+0ESNa4EdgMEpeyxDxglkzmPBYAdbmsfwbMv32/92A+R4zgidEM1JsniQyt3xQLvM7bMwdNTsuIMGIk1IXuqNblUVBN8U1RLe2zIa2z6CulMSnYmyX0y/DmcnksOipngB3Z3NCQzzEtv+zceJnEqfoPAjU5zeMtDrvviYUBP3H9d5y7y37ulqZaAfg58pTPE4cuIO8uenFblw/pqFcZCBDvPP4wzYKqf/KIQTWpmsLUbvJiNfnOojYYTBN1LUtPu0LWSZ+KHVxQrh0wBz1cr9aNIEMyNNCI1lZzTdeWf/bfNXAo+Zu2dFkbt0vhhLC6+1fQULyR/nXVsVaympiaBP8mA6ow8P7+AGHMa5bpp6LQVz2ld/v0H4v/QCWCmWwpmlOWeie+tnEhWa/TNbymXOOVTFhZlF3rwJoj0XcIMFnKr6AxpcCfasrP0/GgneVng8fGC6RtrBanftLeBxwx7+h5sIbtTiwFRd4KD4c/ELawhg119MmU+iTBWBfnrtFVo/45Gi5pwIJ/Z7iKxfRaIAB4HE30lnKOUjTLrkxqwPQTtyf2rGB17dtmiO+MtkKpLEtOcO+jnzHnuNq0l2oxTgtCnBz/klboqYGibNoUNMAQmW2JgUjeN9ul9+WrAfL9/M0fjZlyy5JPXjUIMZBXjOQWhxZ/VdZOAN8P7yT5B49g+C71SujQA2EeVcoBW6Zzb/M4DufDVYAJbs9QntO5/66/K/kjyh3aPKwN9iiv5Uy78EIMs3UkckA2rohxvona417DVLCuPouOhya6rlq9LYa45QxLU0JsksAQaRMPfogQVHnBRlUiLWPEnDZPcXjRPczdmL+5mGS5fgwX7bxWCzzWmLVLB4aKxqQYsMlvIHY3 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: In an effort to address slab fragmentation issues reported a few months ago, I've replaced the use of xarrays for the directory offset map in "simple" file systems (including tmpfs). This patch set passes functional testing and is ready for code review. But I don't have the facilities to re-run the performance tests that identified the regression. We expect the performance of this implementation will need additional improvement. Thanks to Liam Howlett for helping me get this working. --- Chuck Lever (6): libfs: Rename "so_ctx" libfs: Define a minimum directory offset libfs: Add simple_offset_empty() maple_tree: Add mtree_alloc_cyclic() libfs: Convert simple directory offsets to use a Maple Tree libfs: Re-arrange locking in offset_iterate_dir() Liam R. Howlett (1): test_maple_tree: testing the cyclic allocation fs/libfs.c | 125 +++++++++++++++++++++++-------------- include/linux/fs.h | 6 +- include/linux/maple_tree.h | 7 +++ lib/maple_tree.c | 93 +++++++++++++++++++++++++++ lib/test_maple_tree.c | 44 +++++++++++++ mm/shmem.c | 4 +- 6 files changed, 227 insertions(+), 52 deletions(-) -- Chuck Lever