Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1365720rwd; Tue, 16 May 2023 16:24:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ47qk+psSvfjzFw+84CzNr8zA7I2KGarMe442vuQ+jHRxouYFsGZMIxg0L9AFvvpN2AK8wr X-Received: by 2002:a17:903:18c:b0:1a6:7ea8:9f4f with SMTP id z12-20020a170903018c00b001a67ea89f4fmr435192plg.26.1684279469673; Tue, 16 May 2023 16:24:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684279469; cv=none; d=google.com; s=arc-20160816; b=sR9UCTNGWb5eLirT20LKM+xogY+WsWmk5IvpiHlsiOkVwvdPXcXYCr5GunQLPT1jEb nig/zN4+2IgE11jTyeKvtN+W8muadavcALqC+DigRHXBKvfmAh0+SJSJyAXEOrnMIChN J7zeYclBS26cEaYkvDiejdyMAVpDx3Vdf7T2hBp//EnZeIM+6bqscf0uhSc6GPCy2hkQ PBOwXfpXk8SVJ851a3TaxTkp5qpBCZgwN7GNDM7Xr8z7CNnQPfEH5o2UMUJS/++jfC+G MvmddJ2js3EMKoPLwYI3aNiFDuZwRDnp3AYZYDbGXnalMnfGWo8jzvBwH/7au6aYOozH mzBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ComBD5cVSZXxb8CF1oU6ofe5UBMPl0+rt3cWiD9Tacg=; b=Sc1buQK/I+qxWkvuti/BITm2phatYI1cbWB3yz7J+xNR8I9D5fa/4Hjh2nSZZm02WS C8loEi9b7DcCmuyBB5Uyod/mbn2tSKgy3i/CzyqHkzidR1zU4hwx+YRdg70kkYZ2CqMS rB5VE1+p7Rqm94yVdRbkLYLXtdDTPhRbzLrP5mKZgWNXxiCLO/t2WbWhdmQes5GSh7f0 7rNPoA/ebxm4RB+HVHI/QxGkYg6R05ePkH62enBlQds9o7WBeSdBLK0xfspzfAeOUdQT +u+kqhU/sTUJM8ioUB88KHnMrhyP2wb1Zwe1Z28W3c5JBi002s7FKmRp01mzNlHedzAW D+qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fromorbit-com.20221208.gappssmtp.com header.s=20221208 header.b=nQDi6NYr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j11-20020a170902690b00b001ab089f7319si18793902plk.52.2023.05.16.16.24.15; Tue, 16 May 2023 16:24:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@fromorbit-com.20221208.gappssmtp.com header.s=20221208 header.b=nQDi6NYr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229873AbjEPXPo (ORCPT + 99 others); Tue, 16 May 2023 19:15:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229644AbjEPXPm (ORCPT ); Tue, 16 May 2023 19:15:42 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FB1B4EE0 for ; Tue, 16 May 2023 16:15:39 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-64ab2a37812so9104177b3a.1 for ; Tue, 16 May 2023 16:15:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fromorbit-com.20221208.gappssmtp.com; s=20221208; t=1684278939; x=1686870939; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ComBD5cVSZXxb8CF1oU6ofe5UBMPl0+rt3cWiD9Tacg=; b=nQDi6NYrzWKrK0bA4GjAg3dfl3oHSpMlCxu4FLE1nnFNWHCjuRLMFhBS9Nqwu8kjjn 1Cl5BHAOoCd5zi7pqEenAcLKhi8pm72XFABs6sCcMumuOF52ZsWEZ8gjFp/qcKgkHe/t OuWN2+FkrNqC1e+TUc0aTRu4ojycowYVSnRuMA0XNS3ZbgOnKaE2SjNZJx3J/D/8NBgU arE7TsWhDx5uCTWpuNMzDwYmSGQXfjQ/5y2YrYDo9TzLOk5QoIjGoezXygUQiRKNlinI sRBGrWIzZmfKupV+Ufgs9EskGsOUt5Ti6pfL3Jl4Wsc3n8rUbs9HvypBXUOFyzfux9Li ooDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684278939; x=1686870939; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ComBD5cVSZXxb8CF1oU6ofe5UBMPl0+rt3cWiD9Tacg=; b=HItSe8sEBg2znh5w6tUyFBHrAlUoxg7aEIeNokXU6wMY9lWfBzzf94KkulvkylNIWR +9DMr/+XViQulJqncR18Wkn3Ibh7pEvmc8gjlJNvozVLmNySgDKhnH+MW7zSt/w5HrXg Q1FR10Hwm7ItUfYakIFJc/rHczfiqXAjGgR1OA/4HxI9B+fRONdL8/L7btbu9nZhytYd MrcZYMHP7Tvk1GArSUn5Td0lMf3apM4DR40l1ORj9UalYF8TU5C5SeBYObObp23j8KFh qEyuVQl+8ns2hHJCylZvBJ9vfGBlQPuXwTc/8uvO0iPvoNyyrBEfCoJbdvtnsXqfopm2 rtog== X-Gm-Message-State: AC+VfDwkZTDN3sp9qu7JEc9ZCSZpJn0/OeqcNqbbWiJdbmoWzW+hEr4J mPsoZLfn8PJnuYPiDympUU+qnw== X-Received: by 2002:a05:6a00:238c:b0:64b:e8:24ff with SMTP id f12-20020a056a00238c00b0064b00e824ffmr367750pfc.17.1684278939473; Tue, 16 May 2023 16:15:39 -0700 (PDT) Received: from dread.disaster.area (pa49-179-0-188.pa.nsw.optusnet.com.au. [49.179.0.188]) by smtp.gmail.com with ESMTPSA id g26-20020aa7819a000000b0063799398eaesm13840532pfi.51.2023.05.16.16.15.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 16:15:38 -0700 (PDT) Received: from dave by dread.disaster.area with local (Exim 4.96) (envelope-from ) id 1pz3tG-000KiC-28; Wed, 17 May 2023 09:15:34 +1000 Date: Wed, 17 May 2023 09:15:34 +1000 From: Dave Chinner To: Kent Overstreet Cc: Christian Brauner , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-bcachefs@vger.kernel.org, Dave Chinner , Alexander Viro Subject: Re: [PATCH 22/32] vfs: inode cache conversion to hash-bl Message-ID: References: <20230509165657.1735798-1-kent.overstreet@linux.dev> <20230509165657.1735798-23-kent.overstreet@linux.dev> <20230510044557.GF2651828@dread.disaster.area> <20230516-brand-hocken-a7b5b07e406c@brauner> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 16, 2023 at 12:17:04PM -0400, Kent Overstreet wrote: > On Tue, May 16, 2023 at 05:45:19PM +0200, Christian Brauner wrote: > > On Wed, May 10, 2023 at 02:45:57PM +1000, Dave Chinner wrote: > > There's a bit of a backlog before I get around to looking at this but > > it'd be great if we'd have a few reviewers for this change. > > It is well tested - it's been in the bcachefs tree for ages with zero > issues. I'm pulling it out of the bcachefs-prerequisites series though > since Dave's still got it in his tree, he's got a newer version with > better commit messages. > > It's a significant performance boost on metadata heavy workloads for any > non-XFS filesystem, we should definitely get it in. I've got an up to date vfs-scale tree here (6.4-rc1) but I have not been able to test it effectively right now because my local performance test server is broken. I'll do what I can on the old small machine that I have to validate it when I get time, but that might be a few weeks away.... git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs.git vfs-scale As it is, the inode hash-bl changes have zero impact on XFS because it has it's own highly scalable lockless, sharded inode cache. So unless I'm explicitly testing ext4 or btrfs scalability (rare) it's not getting a lot of scalability exercise. It is being used by the root filesytsems on all those test VMs, but that's about it... That said, my vfs-scale tree also has Waiman Long's old dlist code (per cpu linked list) which converts the sb inode list and removes the global lock there. This does make a huge impact for XFS - the current code limits inode cache cycling to about 600,000 inodes/sec on >=16p machines. With dlists, however: | 5.17.0 on a XFS filesystem with 50 million inodes in it on a 32p | machine with a 1.6MIOPS/6.5GB/s block device. | | Fully concurrent full filesystem bulkstat: | | wall time sys time IOPS BW rate | unpatched: 1m56.035s 56m12.234s 8k 200MB/s 0.4M/s | patched: 0m15.710s 3m45.164s 70k 1.9GB/s 3.4M/s | | Unpatched flat kernel profile: | | 81.97% [kernel] [k] __pv_queued_spin_lock_slowpath | 1.84% [kernel] [k] do_raw_spin_lock | 1.33% [kernel] [k] __raw_callee_save___pv_queued_spin_unlock | 0.50% [kernel] [k] memset_erms | 0.42% [kernel] [k] do_raw_spin_unlock | 0.42% [kernel] [k] xfs_perag_get | 0.40% [kernel] [k] xfs_buf_find | 0.39% [kernel] [k] __raw_spin_lock_init | | Patched flat kernel profile: | | 10.90% [kernel] [k] do_raw_spin_lock | 7.21% [kernel] [k] __raw_callee_save___pv_queued_spin_unlock | 3.16% [kernel] [k] xfs_buf_find | 3.06% [kernel] [k] rcu_segcblist_enqueue | 2.73% [kernel] [k] memset_erms | 2.31% [kernel] [k] __pv_queued_spin_lock_slowpath | 2.15% [kernel] [k] __raw_spin_lock_init | 2.15% [kernel] [k] do_raw_spin_unlock | 2.12% [kernel] [k] xfs_perag_get | 1.93% [kernel] [k] xfs_btree_lookup Cheers, Dave. -- Dave Chinner david@fromorbit.com