Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp816599imm; Fri, 8 Jun 2018 05:51:55 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJYBgUjqIBl9uJbT4iq30Etdsqdj05ztzjW/7MTyQ+ndfVRI+Ca3YnwVXEv0tMGFmzNV1QP X-Received: by 2002:a65:56c1:: with SMTP id w1-v6mr5255061pgs.227.1528462315203; Fri, 08 Jun 2018 05:51:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528462315; cv=none; d=google.com; s=arc-20160816; b=SBu9CsHShKGtalFUfykQN6S615SQoOAVCCRyb+xz7XTXKwGrR0VsEeCHzUSOjvjhLA EbqgKkA3VdUfTvzSEVPfA73bcQ8LPYcmgsByv2CEuxVQKs4I0LeloksLgppl//ye1Rev lAmGwlkulvvTiN94az1WEDbPHsPtV7O0oqT564NfIdO1KeI1DRhFTWUnXBJ6TMtLckSa eFOrezNtdEysmNAT30hy1hTkHrcfX54+icOoRqmejy5jxdAjLz2QsE7uSFbD6SkKR4PM ByY17zb3nMkTwasoV8tc9JRlrzpSHXicUTi7CIsT3M+F67GX6EpwTJIKrd6ZrTgDlJTU +FXg== 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:message-id:subject:to :from:date:arc-authentication-results; bh=tOQqDwTc9pVdPPv3fY5SlV6VErFokw4s5OLbhPJh2us=; b=llZOYRosj6tR9s74o421FsV9dk6dUiXUpyHDLLPyJ0Gz9FJhrPUPIkxqxj8fxGvWBV 9SKtg/2k9gxCxo+MCp4St4WKc1eJ13X7HL8iukDHYlwdyqVnWqtb8CHG3YXoDino+cuO H/cDG5KIrr9EIsf/WT2pExSOEKkJYxaiEVOluVOGT+RTSdl/7w27FvA6OEUwqX5F2Wcj 0AzSMxdkD+f6lzw0S0FDZvd6ca9SllOBNiP8V2AT8tjvxlXCuCrQnuxtWOEhfumP+2vz YVKgA8iV+FQUHiWWqbg6l7gXnMaVzpcRZOGb/XmYngNlyA/t1qwY+FNKisu0XAgEmdni /t8g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z6-v6si13620283pfn.232.2018.06.08.05.51.40; Fri, 08 Jun 2018 05:51:55 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752985AbeFHMuw (ORCPT + 99 others); Fri, 8 Jun 2018 08:50:52 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:52436 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751384AbeFHMuu (ORCPT ); Fri, 8 Jun 2018 08:50:50 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0A350C12BA; Fri, 8 Jun 2018 12:50:50 +0000 (UTC) Received: from ming.t460p (ovpn-12-42.pek2.redhat.com [10.72.12.42]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0890310EE6CE; Fri, 8 Jun 2018 12:50:33 +0000 (UTC) Date: Fri, 8 Jun 2018 20:50:29 +0800 From: Ming Lei To: dsterba@suse.cz, 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: <20180608125023.GA9444@ming.t460p> References: <20180525034621.31147-1-ming.lei@redhat.com> <20180601140954.GY3539@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180601140954.GY3539@suse.cz> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 08 Jun 2018 12:50:50 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 08 Jun 2018 12:50:50 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'ming.lei@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 01, 2018 at 04:09:54PM +0200, David Sterba wrote: > 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 Thanks for your test! > 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. OK. We could decrease the affect by using a lightweight iterator for bio_for_each_page_all2(), will do it in V6. Thanks, Ming