Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp642377imm; Fri, 1 Jun 2018 07:13:43 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIgKNKJ0vA7wIRldHyi7gqYXHRoLZ536ose96kzkduDeent/juoRuOuJBtUk7c3JEAaP9c1 X-Received: by 2002:a63:6e8f:: with SMTP id j137-v6mr9210728pgc.453.1527862423075; Fri, 01 Jun 2018 07:13:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527862423; cv=none; d=google.com; s=arc-20160816; b=yHH6HcxNplXkF8OSEZB1RmyYKeZJNHg70aIR4U0of7HeIe4mgytppmpIRWEuXsrMoU 9XKYXdZpmeEeS6LsZrRgdKIcBE80i7lGJ0HRAveh3a0JUgyjeGI1sYwcyKz9QIm5/M2s BqF5zMjUonLfnf6RSAKEeOLsRmbivNfgnJ+9+1KnR9mjh1TvnASz/p2x4pqafuRVrPl8 JobAka8MUF9jc/ScX6lpC7Mg4dctrgIUZIrm0xpkXJLbIFQI8MAQ/j0cghGUAGuAzRcf 8hBMeppH9TEyoXA2M5SAiyxtlO2+TizJ4kmzahYD4OY8kztmpxx8CVAoPpjOJzRE5CID enqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=WoeyCWxi4qsobp94l8mUCSv+8hhz3p0FewrLUVVLIZA=; b=rE+KP+oI5fJaA7PmKnAhDUEVB4998vD24SxUZV9XGESxRnMn9L/Icq39w5+i4Yw1eX KfgZBxiG6+QRfR2gcpWKG5gXzqi8Je/P0NKblizW4Tj+iHgMwxPYX+b9xjdjC4PnXcf5 PPgIebGh0knew5+EQ4ipkcrIXzLxMYYAbYCNMF+fs36gArmxBChgC1tqlv0k9IBc/fmO LGLSs3M/+MafO54NygQ4MgS8vwHUj+9PIjNVT3tA8URa8YyRcwZ5/EV176gRCz4GwDfb bWfmD7x2xBCQc+q2prZEQqn1mt746MRjCzpdWXiDw4SXD4sX6SJlABxxH1qgcctk1UlE r9hg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s189-v6si21749788pgb.486.2018.06.01.07.13.28; Fri, 01 Jun 2018 07:13:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752049AbeFAOMq (ORCPT + 99 others); Fri, 1 Jun 2018 10:12:46 -0400 Received: from mx2.suse.de ([195.135.220.15]:33104 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751741AbeFAOMo (ORCPT ); Fri, 1 Jun 2018 10:12:44 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 00CF5AC79; Fri, 1 Jun 2018 14:12:42 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 9BFBADA998; Fri, 1 Jun 2018 16:09:55 +0200 (CEST) Date: Fri, 1 Jun 2018 16:09:54 +0200 From: David Sterba To: Ming Lei Cc: Jens Axboe , Christoph Hellwig , Alexander Viro , Kent Overstreet , Huang Ying , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Theodore Ts'o , "Darrick J . Wong" , Coly Li , Filipe Manana Subject: Re: [RESEND PATCH V5 00/33] block: support multipage bvec Message-ID: <20180601140954.GY3539@suse.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Ming Lei , Jens Axboe , Christoph Hellwig , Alexander Viro , Kent Overstreet , Huang Ying , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Theodore Ts'o , "Darrick J . Wong" , Coly Li , Filipe Manana References: <20180525034621.31147-1-ming.lei@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180525034621.31147-1-ming.lei@redhat.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 25, 2018 at 11:45:48AM +0800, Ming Lei wrote: > fs/btrfs/check-integrity.c | 6 +- > fs/btrfs/compression.c | 8 +- > fs/btrfs/disk-io.c | 3 +- > fs/btrfs/extent_io.c | 14 ++- > fs/btrfs/file-item.c | 4 +- > fs/btrfs/inode.c | 12 ++- > fs/btrfs/raid56.c | 5 +- For the btrfs bits, Acked-by: David Sterba but that's from the bio API user perspective only, I'll leave the design and implementation questions to others. I've let the patchset through fstests, no problems. One thing that caught my eye was use of the 'struct bvec_iter_all' in random functions. As this structure is a compound of 2 others and is 40 bytes in size, I was curious how this increased stack consumption. Measured with -fstack-usage before and after patch 22/33 "btrfs: conver to bio_for_each_page_all2" -disk-io.c:btree_csum_one_bio 48 static +disk-io.c:btree_csum_one_bio 80 static -extent_io.c:end_bio_extent_buffer_writepage 56 static +extent_io.c:end_bio_extent_buffer_writepage 80 static -extent_io.c:end_bio_extent_readpage 176 dynamic,bounded +extent_io.c:end_bio_extent_readpage 240 dynamic,bounded -extent_io.c:end_bio_extent_writepage 56 static +extent_io.c:end_bio_extent_writepage 120 static -inode.c:btrfs_retry_endio 96 dynamic,bounded +inode.c:btrfs_retry_endio 144 dynamic,bounded -inode.c:btrfs_retry_endio_nocsum 72 dynamic,bounded +inode.c:btrfs_retry_endio_nocsum 104 dynamic,bounded -raid56.c:set_bio_pages_uptodate 8 static +raid56.c:set_bio_pages_uptodate 40 static It's not that bad, but still quite a lot just to iterate a list of bios. I think it's worth mentioning as it affects several other filesystems and should be possibly optimized in the future.