Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1502745imu; Tue, 20 Nov 2018 19:45:16 -0800 (PST) X-Google-Smtp-Source: AJdET5cJ8GaR9z8vXp4Ux7ghAo4WQFIUkZuTMbFJScrBv+5FyQ8IsRh4OXW0bhutDGNGF66bcc0B X-Received: by 2002:a62:b9a:: with SMTP id 26mr5159533pfl.196.1542771916892; Tue, 20 Nov 2018 19:45:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542771916; cv=none; d=google.com; s=arc-20160816; b=q5/3EwR0rcwCA9lJAsJMzGvGCQxHyY4kKccq4c5XrFY1rnbrOsPomnjOlJcRqvgEjR BAMxg57nLBetj+2sHzy4S5a1Vdjtm0uI7O1CeW9ZctlAiQ2kF695xHulR/ckSZwnS+LB kUzzqbOAb1Do+Gl0sg0gQ2tHI6y4QRpstQAWHPvEiPwE53AF+/0anqjfqoSRNzVD/QHy DG8XCs2le8DSq2KkplIKypS1Ki18pcZYs6WvWUZ+3rfvD2TPWnvmusZHyrde4ZOvG62a JLSFp0LjL6Qn/0GRBpBaUhCUEzGxla6vN2RO6QwxAoNm6coTsF9m8Cq8lxXYhwU8d7vJ GFTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=YUDK3byES5Clx+gNUxLq8kbY4gy4QnhkCiPin39VMxU=; b=a7RKrv/+KJbWSBzaWKzgHsvA4UvIJnWBxdWyFkDrplNDsA3iu0CTtAxpej+oOEGHeU YoxHbdP5boek8bwVdxhN3Txflmm1rUt8p/F1qgvixPG2ht88Ra86X28maHrowoEg1GUt pY7Nq45iWkBf4qFc+4t54xrgRmtm6HJfYSDXcM6vENp1GYZ7/OIreorpHWNVyrhcoWDG 7X1mnJtgOOfXYZCSVUm+oIY0aHK7LxPyZmaHcmRV5FQ6eI4gn+sWK9btN2wr+55oaa4g Z740WwfYLlosA9Ik9NwxoOWKjjpO6tgUdqgQ7EWdGYgeM2yXTfRSJPHMDRgAoXKFyojh aJaA== 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 y12si15370310pgf.527.2018.11.20.19.45.01; Tue, 20 Nov 2018 19:45:16 -0800 (PST) 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 S1727327AbeKUNx0 (ORCPT + 99 others); Wed, 21 Nov 2018 08:53:26 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:34198 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726343AbeKUNxZ (ORCPT ); Wed, 21 Nov 2018 08:53:25 -0500 Received: by mail-pl1-f195.google.com with SMTP id f12-v6so3336975plo.1; Tue, 20 Nov 2018 19:20:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YUDK3byES5Clx+gNUxLq8kbY4gy4QnhkCiPin39VMxU=; b=jXyUi5l9NdbIs24pP1OZovAfd2v6oIrojxCkmmIZmnGPBtd9cv5iusJJsZMcAKwE/D +sx8zMVTBKTHhvYqVbmfiD6ZrD60aIBpIK8pLbes71cmZXF6S9HKawMX9gVQgA+L/2F7 U+Md3MM8p1udCjHF2eZO9nCuoBDZzx6hDM63nYXdk2fv9DAiSN21YvsSo4WBw4Mtlp09 Nj6ugtqp878LkVj1NOD+llU8Ourkjlf+lEv0Isaf0ygzecfz0vrIQUC5HfQgybecFk9S zwXerpnJwyV2NCgyim7aaoSoxfi8k4B/PSlU8H3Ab+ypHVCv/eJvdG884mySGDXRkJpV 9l+Q== X-Gm-Message-State: AGRZ1gK7INY9GGd9aVsQecyoDR0XYBkBLZYzgtnhB+z5Tcu9IFyY4cbl Xi7LGaUy+QEFINnfKDTOxtA= X-Received: by 2002:a62:b9a:: with SMTP id 26mr5096104pfl.196.1542770454986; Tue, 20 Nov 2018 19:20:54 -0800 (PST) Received: from ?IPv6:2601:647:4800:973f:8a0:7611:3223:f4db? ([2601:647:4800:973f:8a0:7611:3223:f4db]) by smtp.gmail.com with ESMTPSA id t90sm36137627pfj.23.2018.11.20.19.20.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Nov 2018 19:20:54 -0800 (PST) Subject: Re: [PATCH V10 09/19] block: introduce bio_bvecs() To: Ming Lei Cc: Christoph Hellwig , Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Dave Chinner , Kent Overstreet , Mike Snitzer , dm-devel@redhat.com, Alexander Viro , linux-fsdevel@vger.kernel.org, Shaohua Li , linux-raid@vger.kernel.org, linux-erofs@lists.ozlabs.org, David Sterba , linux-btrfs@vger.kernel.org, "Darrick J . Wong" , linux-xfs@vger.kernel.org, Gao Xiang , Theodore Ts'o , linux-ext4@vger.kernel.org, Coly Li , linux-bcache@vger.kernel.org, Boaz Harrosh , Bob Peterson , cluster-devel@redhat.com References: <20181115085306.9910-1-ming.lei@redhat.com> <20181115085306.9910-10-ming.lei@redhat.com> <20181116134541.GH3165@lst.de> <002fe56b-25e4-573e-c09b-bb12c3e8d25a@grimberg.me> <20181120161651.GB2629@lst.de> <53526aae-fb9b-ee38-0a01-e5899e2d4e4d@grimberg.me> <20181121005902.GA31748@ming.t460p> From: Sagi Grimberg Message-ID: <2d9bee7a-f010-dcf4-1184-094101058584@grimberg.me> Date: Tue, 20 Nov 2018 19:20:45 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181121005902.GA31748@ming.t460p> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Not sure I understand the 'blocking' problem in this case. > > We can build a bvec table from this req, and send them all > in send(), I would like to avoid growing bvec tables and keep everything preallocated. Plus, a bvec_iter operates on a bvec which means we'll need a table there as well... Not liking it so far... > can this way avoid your blocking issue? You may see this > example in branch 'rq->bio != rq->biotail' of lo_rw_aio(). This is exactly an example of not ignoring the bios... > If this way is what you need, I think you are right, even we may > introduce the following helpers: > > rq_for_each_bvec() > rq_bvecs() I'm not sure how this helps me either. Unless we can set a bvec_iter to span bvecs or have an abstract bio crossing when we re-initialize the bvec_iter I don't see how I can ignore bios completely... > So looks nvme-tcp host driver might be the 2nd driver which benefits > from multi-page bvec directly. > > The multi-page bvec V11 has passed my tests and addressed almost > all the comments during review on V10. I removed bio_vecs() in V11, > but it won't be big deal, we can introduce them anytime when there > is the requirement. multipage-bvecs and nvme-tcp are going to conflict, so it would be good to coordinate on this. I think that nvme-tcp host needs some adjustments as setting a bvec_iter. I'm under the impression that the change is rather small and self-contained, but I'm not sure I have the full picture here.