Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp187496rdh; Tue, 13 Feb 2024 13:37:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWVw80N3iMTNe8vNlYcORO5wN8CUEf/wtxfG2Tah5wGFGpzNni+w1E30WuZhTSuLl5w9zr42uNXWU4FZZraWNJaGC2WLW0d74ykJhW/JQ== X-Google-Smtp-Source: AGHT+IFeE6OBtyETRruA+NcRZKGqy0MSIfu3kctZ/PF9Qcme6VgQAJV1ZwRt1wAEOlv71Li05+N6 X-Received: by 2002:a17:906:692:b0:a3d:15ed:60e3 with SMTP id u18-20020a170906069200b00a3d15ed60e3mr365483ejb.26.1707860258515; Tue, 13 Feb 2024 13:37:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707860258; cv=pass; d=google.com; s=arc-20160816; b=TZlKqJkD5/x2BLeG9xh0r1TAukC+JoEOIhN2CbXOjvhbfjTY3cBh8GznyKRm6vPONe xhlhfQtyxarn7n9a/SSg9g3WkV5MM6hrLWu598g0Czjg+ACJW/fKKT28J33ZnhAcyM6E YWfv4iQxczHXCKQr2RPWXAUJYmf2PXwqYUpWhp0GfmYYLlh8TILA0XqrShEwV5c3bUqz jvJb4q+auTI9DjUQAfQXRVMYXvdLawooB3pgfe3r9dmRx5PmPnCQPt/drCL2NPhii7YM 28qYrECi4zvAfYPStwdEq1+CLwU6O8pshdXZEaMffL4XZ6n5pTXZCvtZ6AR+wHkHo/GM TOdQ== 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=RcHq7wUhsNRmQ1tsXIqBd79ubl1rsFbYeZOqjkoV5BU=; fh=dUMKmDjSYo3BJgdVHgxh6kpZPHR/rIHz+tA5Ihq/UnU=; b=pEpiA+ngrGikEewrbwTDm33nNbvV1NmPDf0jSRiXf6xyBC0sh6EIG+cxwUmEsQLpEN Zf8VvXGD9mqURC9fXzHhvDt+NYL+3ZZ8F55ZR6evA/TVe7hp5pQUGFOChWxIVCQR+qAJ tcZzyjXDLyHjQo3N57VP1pZuyp+BkHDEwuS7WDrZAryAXZfFHMDEmRLK5ZlaPaOfoVXW u1Apq+Hs5CPm6veudZx+szRBWreToxKg8pAkHd5dKNzVSj/vSEvNmEanAQqnit1ZmOfR LxYwLJ37ZQhNIYSIVQGrdcKumUkT4kEA3pmqavGEx/rd8GpmFyBlNvFbXce042vrqbh2 lWdQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OWJepqos; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-64340-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64340-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCX/MieUrpZ5sypA8OoCs2ybIgubSU4RRTN9IIXPtkW1U+n37jlsCtGNs0S0DOxaT/KRaEh9g3EnYm6iMqV882oFm5MapAkhFWnsU8qy6g== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lf8-20020a170906ae4800b00a3d04123264si965608ejb.539.2024.02.13.13.37.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 13:37:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64340-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=OWJepqos; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-64340-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64340-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 41A871F25340 for ; Tue, 13 Feb 2024 21:37:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5BE466169F; Tue, 13 Feb 2024 21:37:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OWJepqos" 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 8008D612F9; Tue, 13 Feb 2024 21:37:20 +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=1707860240; cv=none; b=qJZxCh7Q0JhxpjygxmOiFDkHVXqVVzLTQGoqwhSlxJUSYEYEq2qsD38lHktCLk7sw3T23m19gd+glu5zV3KeiUenjy2y4KhvKSGOVzGHNoikaN26aAHSW1FG9n7oAJ5Hw5Rt7uAkqG8P4WzPs4YPp4m7Lz5Xcb+JRkWzF5mJfQY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707860240; c=relaxed/simple; bh=iZuJJf2L4A/9BC89nmeB2uDzQCKPBrFKPnqEznO8JRo=; h=Subject:From:To:Cc:Date:Message-ID:MIME-Version:Content-Type; b=e8TN/afQsszFgPyntHfjOSSPeKLr2evpqyiY5cVKRy3Fo39zxJpHbcMOHdQELNd2jipQffr7dANTpEiGPIxo1JB6N2QhCP8n1nQHPur4ckgYYzo6bHbkjdZX4qp0np7V3peDC3+QxRcEpps4uAkTX9FmfACClQoQS7lMm2CsXXw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OWJepqos; arc=none smtp.client-ip=10.30.226.201 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 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). 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