Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp375048rdb; Sat, 17 Feb 2024 12:24:11 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXaw4MwcutiiPhHGxG50JNcpXn+Stn7osik79IqctxGF4hbyZBe17RC/X0j6xY9n7P/gyrq/lA6rzATuaRc2Un/h4sn5cw376dPuAFYuQ== X-Google-Smtp-Source: AGHT+IHIdXYn4lhGiD815hnkiBVJXS9ImPb2dUaKv+erHSrB+idnZL/NzOTPwSziTWWxxBwCdH/6 X-Received: by 2002:a50:874f:0:b0:563:e5c0:af96 with SMTP id 15-20020a50874f000000b00563e5c0af96mr3859317edv.4.1708201451591; Sat, 17 Feb 2024 12:24:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708201451; cv=pass; d=google.com; s=arc-20160816; b=Lqio9kL9LlfQ1v0jHZ0sdqzN50v5UmbP3w7LnH46gg4XpAv3INUoLLEe2yxVe1KG9B 0dIcq2ngOsfjrO4UKAnD3kJ7WrUlqndcUe2R5SEjvBbF7w4bHqdJgOaOFF/QBCxpWs6Z cnMtANyzyJKkRildIjgCc60eicIGSheG8dirPn6K/2QyAag0bLEoXLJxDdaStZu/z3RV sCZcIRThZ+s3y37DBZvQGhzw+A9cR0iqsvvxcWWYNKGsNxwEW1nUES3qdgo6y5w1cFNs GxOPyw9m17CRHFRTT9FrtcyU0x4gLPkU129SDlwJzz6XzKBU7/1nd9Mgs30+DWME8FsW URtQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:message-id:date:cc:to :from:subject:dkim-signature; bh=r1eZyipcao5SOLKHRAKx6Fgap7LCSmTQirVsCTOvDGI=; fh=0JMhqiWEaK+qw2xgbbey7OsRaoj7Z6cFR6nhiwhAbe0=; b=ugBAGxXw4wLk9nDc4bG5OFqqrS0GtnFwlkqzauiVaDH5frP0euopzbqO/Eq+5Ofh4g Un1LMt9afikG6dhs6f8agG9sRCublZdIp7nCHF/ug0NjQ6pci21IwtoSgljRlHs/TKdV w/IImNWN83hPfGKnXrs8Ms98YDsHWeoEjjZ97v+x1uxAxazk11rSKD2vHwqDPtvwE3h1 GYz4YAAzLV0wr/zS6k3x3J3W7XrRWLobrMJY1C5jvmGimv3hspgq0gqPPsTcxJHKB18J pBz7mC1mcBbuyfeUS/ZLqVFN+Diwf9F5LjC9yyUeWMJUiBFXoZasny4LCF5VqbC98yTP PRXA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kF6WuRqj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-70067-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70067-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id r15-20020a50aacf000000b00564477609c3si114615edc.378.2024.02.17.12.24.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 12:24:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70067-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kF6WuRqj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-70067-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70067-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 56BFD1F22198 for ; Sat, 17 Feb 2024 20:24:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F4C27F460; Sat, 17 Feb 2024 20:23:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kF6WuRqj" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F3047EF04; Sat, 17 Feb 2024 20:23:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708201415; cv=none; b=ES+JFhR8ofJwvdGAhyOUTtQLgA95vSRY5+i+BiXoWT51PLko21dHPMmq6bC9+3YK8ZsqNoE8T1zmtM2NgxnGifiMkIeT1fxdRV2b5gHxfvgBGlx/DC7FihOkTCz6b8DKFUbnmFy207sdcvJWG5+i0mEjT/t7seeF7AimhNSAL5Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708201415; c=relaxed/simple; bh=4t7dPPQMhWfJU3cAARNkKz1sCE8G4qlxADkwZj7St1g=; h=Subject:From:To:Cc:Date:Message-ID:MIME-Version:Content-Type; b=GMFHCXTM4glqPw0Nuh9+jhmKiz5CBNS5yuqLEc2d/acsnv0+KSMniDnAxz8m1+O3G7OLo07tSI1QTqdmItPGWcOdhmO9on+lSZqtTzwOwAD9AcLw4zJUjVJfthq2xrpyY77iuGQF/dH6RhPPIxAGHvraWMg4Og5U8K1DWVuNNrI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kF6WuRqj; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EDD9AC433B2; Sat, 17 Feb 2024 20:23:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708201415; bh=4t7dPPQMhWfJU3cAARNkKz1sCE8G4qlxADkwZj7St1g=; h=Subject:From:To:Cc:Date:From; b=kF6WuRqjYC+NyxUMjH+o0NK2IbDxcQ3Y5fMeNaTVtxzFzw+uUMRpYEHgQXDKXOw2u dvrSiD8vdsg7LhDEZZYOxxuh7OS5yIcrcIlCKoE/AyHzNzk/Wf9Ji1HOs61XVXeVom ER/P+PqNvv7CFlIX9FJsyJKzrxaKEgrjWCZOTStruBQ+csnfkHVsRDoMsFkb0/rQAM DsrDqNFlVaFHRMVF0ZPcwXpQIP7mEeYTvm0kKv3bC/NJ83SJ5es0o/uiOHRV0BBysv SROfMZPQtkSrhi1OJ52lBACQxatd+qQ/P8m868HacGOMsYbmaunkCKOZd79wkFgaNF vR2r60ruFPdmw== Subject: [PATCH v2 0/6] 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: Sat, 17 Feb 2024 15:23:32 -0500 Message-ID: <170820083431.6328.16233178852085891453.stgit@91.116.238.104.host.secureserver.net> User-Agent: StGit/1.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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). Thanks to Liam Howlett for helping me get this working with Maple Trees. I don't have the facilities to re-run the performance tests that identified the original regression. Oliver, Feng, can you please pass this series to the kernel robot? These patches are also available from: https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git in the "simple-offset-maple" branch. Changes since RFC: - Rewrote and moved "Re-arrange locking" to the front of the series - Squashed the "so_ctx" clean-ups into the other patches - Clarified some patch descriptions --- Chuck Lever (5): libfs: Re-arrange locking in offset_iterate_dir() 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 Liam R. Howlett (1): test_maple_tree: testing the cyclic allocation fs/libfs.c | 96 ++++++++++++++++++++++++++------------ 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, 215 insertions(+), 35 deletions(-) -- Chuck Lever