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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7246AC433EF for ; Thu, 4 Nov 2021 19:31:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 58E7360FE3 for ; Thu, 4 Nov 2021 19:31:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230438AbhKDTeV (ORCPT ); Thu, 4 Nov 2021 15:34:21 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:50728 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230403AbhKDTeV (ORCPT ); Thu, 4 Nov 2021 15:34:21 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id F27D4218B2; Thu, 4 Nov 2021 19:31:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1636054302; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jOF68rlW7lztk0Y/uL4tnCmrsfW4tT3ZiI7IURfG8+0=; b=Kqw7EQ751O40RGU9euwW4Km2acMR/UzNtMDf4C8U9YKhmceYhPV+ntm2f7Mqu/VsIXEme9 C4gkTcs27yg1nCmZq8rWKoMqa81C4OQyS51C9v3g3fHYRJpUsMU0Nw6t0yXwg/4oLEGNVr buH/rzTRgqFQ6qMIqy5S3QGrvWJGRXg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1636054302; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jOF68rlW7lztk0Y/uL4tnCmrsfW4tT3ZiI7IURfG8+0=; b=fizU3ef3TgcP6LGPNJ4UggWV/WzcaY3DEhhA03JKY23UU/3o+yV2yMVBAarGbA5yuf2KBf 4PNn3TR9PdtQrBCQ== Received: from ds.suse.cz (ds.suse.cz [10.100.12.205]) by relay2.suse.de (Postfix) with ESMTP id EA7DE2C14A; Thu, 4 Nov 2021 19:31:41 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 4C8D9DA735; Thu, 4 Nov 2021 20:31:05 +0100 (CET) Date: Thu, 4 Nov 2021 20:31:05 +0100 From: David Sterba To: fdmanana@kernel.org Cc: linux-btrfs@vger.kernel.org, josef@toxicpanda.com, Filipe Manana Subject: Re: [PATCH v2 0/6] btrfs: speedup directory logging/fsync by copying index keys only Message-ID: <20211104193105.GG28560@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, fdmanana@kernel.org, linux-btrfs@vger.kernel.org, josef@toxicpanda.com, Filipe Manana References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Mon, Oct 25, 2021 at 05:31:48PM +0100, fdmanana@kernel.org wrote: > From: Filipe Manana > > This patchset reworks directory logging to make it copy only the dir index > keys, instead of copying both dir index keys and dir item keys, as both have > the same type of information. This reduces the amount of logged metadata by > about half, and therefore we do about half of the cpu bound work, half of > the IO and use less log tree space (except for very small directories). > > This will allow other optimizations to build on top, some of which are only > possible after this change, while others become easier and less cumbersome > to implement after this change. Performance tests are in the changelog of > patch 5/6. Patch 6/6 only removes code that deals with dir item keys when > replaying directory deletions and it could have been squashed into patch > 5/6, but since that one is already large and works without 6/6, I opted > to make it separate to make it easier to review. > > Also, after this change we are still able to correctly replay a log tree > generated by an old kernel, and an old kernel is also able to correctly > replay a log tree generated by a kernel that has this patchset applied. > > I'm sending this close to the 5.16 merge window, but my intention is to > have it only for the next merge window (5.17). > > V2: Updated changelog of patch 5/6 to make it more clear why backward > and forward compatibility are guaranteed. > > Filipe Manana (6): > btrfs: remove root argument from drop_one_dir_item() > btrfs: remove root argument from btrfs_unlink_inode() > btrfs: remove root argument from add_link() > btrfs: remove root argument from check_item_in_log() The above have been added to 5.15 pull request. > btrfs: only copy dir index keys when logging a directory > btrfs: remove no longer needed logic for replaying directory deletes And the rest is now in misc-next. Thanks.