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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22A74C48260 for ; Fri, 16 Feb 2024 15:15:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6BCA08D0003; Fri, 16 Feb 2024 10:15:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 66CC28D0001; Fri, 16 Feb 2024 10:15:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 535608D0003; Fri, 16 Feb 2024 10:15:18 -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 4106D8D0001 for ; Fri, 16 Feb 2024 10:15:18 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id AD39580365 for ; Fri, 16 Feb 2024 15:15:17 +0000 (UTC) X-FDA: 81798015474.03.9162760 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf06.hostedemail.com (Postfix) with ESMTP id DF75A180025 for ; Fri, 16 Feb 2024 15:15:15 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Z5z6tNXr; spf=pass (imf06.hostedemail.com: domain of brauner@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=brauner@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708096516; a=rsa-sha256; cv=none; b=YIEUnwcdMNlz/ga7mxGqf/AIzY6sw3J2yer9HbW/HAkFWVZqjtWNg2tMCI+MRpW+/VWVVW Q3VOVEX9XF1jK3zZlqOA0m4Vgr3aiWe+LmhAT7mhuB9SeqEwljr8IbP+NshlRYIZyEcfrE 6aytylyrLwuEJgTO6IvYaX+KWvC9zXI= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Z5z6tNXr; spf=pass (imf06.hostedemail.com: domain of brauner@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=brauner@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=1708096516; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Kgt/k6J18h+2jk/H+CFP2hRIVpXMOqH8I75KkV+7Es0=; b=t7fTQqFqaSlX3xdJbt114nebrwy2Q/zR8ANF3VQyG+P8UBygt146g7FDKYxmf11cznv7cL aU9PNesoz8m3BI27pSdcFxpl39/HGaFeYPeNqkmYnAMNf4uegCEMjavf1S7NGIjNerwWdZ nS4pIHo7VkTIYiXgLRjMMtXMTFKa2wA= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B603D60CA5; Fri, 16 Feb 2024 15:15:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20F5CC433C7; Fri, 16 Feb 2024 15:15:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708096514; bh=UZxvgj12gXJunVqb524yDyYbBRZhAtSxo48h5jfO3pQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z5z6tNXroCwwc52/0MaC4bKySERpEHLqZ/DkxJWNcdRQcoU/xMf6fkfO7Hz5EFYH6 GwEvpQRJ8IqLoZZ1XZN6VRyYY7JzIUKsBMiZ909lfo30EQUXUYAem2e6VRPHCfBp5I q7gYukmOH2Ku23oNrTM2qd438FNl1Dp0hQ1X1mrYErONLw/swgc8kZkJ7ul91kWva5 6qO8N/oy0gcNbkinJ1x/iiYVol0fLJEvVH+GIFIgsPxDBydpbaoKqf6RhIc7aq7iML LE/dUU7kcvQxvfJPSBgrXK5UaxDjgFKgfBhv9TA4PYZSsIRQu5dVq4QvgIhi/UA1Hi zt+aAoSzCgsVw== Date: Fri, 16 Feb 2024 16:15:08 +0100 From: Christian Brauner To: Chuck Lever Cc: Jan Kara , Chuck Lever , viro@zeniv.linux.org.uk, hughd@google.com, akpm@linux-foundation.org, Liam.Howlett@oracle.com, oliver.sang@intel.com, feng.tang@intel.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, maple-tree@lists.infradead.org, linux-mm@kvack.org, lkp@intel.com Subject: Re: [PATCH RFC 6/7] libfs: Convert simple directory offsets to use a Maple Tree Message-ID: <20240216-prasseln-lachs-3fe73663d559@brauner> References: <170785993027.11135.8830043889278631735.stgit@91.116.238.104.host.secureserver.net> <170786028128.11135.4581426129369576567.stgit@91.116.238.104.host.secureserver.net> <20240215130601.vmafdab57mqbaxrf@quack3> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: DF75A180025 X-Stat-Signature: jb1rwrs4sz99h4iiks7yxzi14cjjbusi X-Rspam-User: X-HE-Tag: 1708096515-593935 X-HE-Meta: U2FsdGVkX1/BdfDrz9kv4OkQa8SpPn8T5MeC9mVlW922jFB+tZTsTTD6m+dZhoHkjpDX5Fwo6ks14wyXUaCn4CoOPRCRQVDpjO9uLwDv7jDONEK9jg3JNxIk7wKGyQ2v/qBNolKFQHCd2A5zAK4RpZ53lhPgcT4sz8U+wvQ4ysZDpD1hdkF8Xnlx0qUjP5St6NYsBbEf4zBPEkeoqxRclXShJZZp6aR+NpNHDFyWqwtU11jjZutwcWQrldfDWq6qIE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Q5HsXOg8wb3C 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: On Thu, Feb 15, 2024 at 08:45:33AM -0500, Chuck Lever wrote: > On Thu, Feb 15, 2024 at 02:06:01PM +0100, Jan Kara wrote: > > On Tue 13-02-24 16:38:01, Chuck Lever wrote: > > > From: Chuck Lever > > > > > > Test robot reports: > > > > kernel test robot noticed a -19.0% regression of aim9.disk_src.ops_per_sec on: > > > > > > > > commit: a2e459555c5f9da3e619b7e47a63f98574dc75f1 ("shmem: stable directory offsets") > > > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master > > > > > > Feng Tang further clarifies that: > > > > ... the new simple_offset_add() > > > > called by shmem_mknod() brings extra cost related with slab, > > > > specifically the 'radix_tree_node', which cause the regression. > > > > > > Willy's analysis is that, over time, the test workload causes > > > xa_alloc_cyclic() to fragment the underlying SLAB cache. > > > > > > This patch replaces the offset_ctx's xarray with a Maple Tree in the > > > hope that Maple Tree's dense node mode will handle this scenario > > > more scalably. > > > > > > In addition, we can widen the directory offset to an unsigned long > > > everywhere. > > > > > > Suggested-by: Matthew Wilcox > > > Reported-by: kernel test robot > > > Closes: https://lore.kernel.org/oe-lkp/202309081306.3ecb3734-oliver.sang@intel.com > > > Signed-off-by: Chuck Lever > > > > OK, but this will need the performance numbers. > > Yes, I totally concur. The point of this posting was to get some > early review and start the ball rolling. > > Actually we expect roughly the same performance numbers now. "Dense > node" support in Maple Tree is supposed to be the real win, but > I'm not sure it's ready yet. I keep repeating this but we need a better way to request performance tests for specific series/branches. Maybe I can add a vfs.perf branch where we can put patches that we suspect have positive/negative perf impact and that perf bot can pull that in. I know, that's a fuzzy boundary but for stuff like this where we already know that there's a perf impact that's important for us it would really help. Because it is royally annoying to get a perf regression report after a patch has been in -next for a long time already and the merge window is coming up or we already merged that stuff.