Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2498752imu; Mon, 19 Nov 2018 01:19:27 -0800 (PST) X-Google-Smtp-Source: AJdET5c01amGSydIh7Ol7KGKWagrfgJCXQzAMZpDTctCt8jClRNrIbAoLOqXkXjup1HxDZdFi9At X-Received: by 2002:a63:f811:: with SMTP id n17mr19870223pgh.23.1542619166970; Mon, 19 Nov 2018 01:19:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542619166; cv=none; d=google.com; s=arc-20160816; b=WvAxbWVC92uQdaFW+iV+/iwDGd2yEu2B0/gYRLUhrT2ChWJnJC3cus5v041QrGm+HB s5nak7MPl/MjDgrHwxfcC9M/2Gl0WeoJSEyYmMtGxGBCO+MmXCXX/SGJQS16LP6xBMJc KhoCYswn071shpW31wJlpE/C4MaDAp2g1nKcTQ6Tw084wm8YqJTJQ6TL5pZDdbsf5jm7 crbf5Yx2MfOSkvCp4WX9+aLQZhD6kwQtJ/479WshXhytThqA2XAzZHVK80Xg69UfyFPq iu9pNbYBL3QNp7HDKZDr+ylmILkiZ2LvW1EsYdFuANCWdEpOcdIZtHmcdVChpO5CK6WQ mEyw== 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:cc :to:from:date; bh=dJw6EigBN2515xRMjrkamHP0+k4IxnJHIoXUvXfkfx4=; b=m9tC+6uhvUCBTLzLakaIFJeTCsquwXkAfsxdib2KHoU6e+AVunlFn26B+seelhvxic 84/6aif5P4FhBxSWdy0COAFS5oOi8J/qMlb5BVlzusC1T51wDY+WI274bDGw88/Zyx4q Nnae+Lc+Q88b97CGnRrx2i4hZSDKfgPhceX/d5eDXYKsbhgkdTAeEwv1p9ntSa5uvakw 9Zkx7xDx0wG/PGlipwBHrpZy4ZpCjqt8fwpppjz9qCweL6DS+CO3Tj87ZS0sdbxLtmZd KEuYPr8rYkjd58Jr1wFP1fYAQnRs9VrCcHr9t1xkMhydBmYIrHNPAaItmMV9eoEDSl67 kTrA== 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 p2si38581131pgr.133.2018.11.19.01.19.10; Mon, 19 Nov 2018 01:19:26 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727457AbeKSTlU (ORCPT + 99 others); Mon, 19 Nov 2018 14:41:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52658 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726988AbeKSTlT (ORCPT ); Mon, 19 Nov 2018 14:41:19 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 62C003DE0C; Mon, 19 Nov 2018 09:18:17 +0000 (UTC) Received: from ming.t460p (ovpn-8-26.pek2.redhat.com [10.72.8.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D559D600C7; Mon, 19 Nov 2018 09:17:51 +0000 (UTC) Date: Mon, 19 Nov 2018 17:17:46 +0800 From: Ming Lei To: Omar Sandoval Cc: 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 , Christoph Hellwig , Theodore Ts'o , linux-ext4@vger.kernel.org, Coly Li , linux-bcache@vger.kernel.org, Boaz Harrosh , Bob Peterson , cluster-devel@redhat.com Subject: Re: [PATCH V10 18/19] block: kill QUEUE_FLAG_NO_SG_MERGE Message-ID: <20181119091746.GO16736@ming.t460p> References: <20181115085306.9910-1-ming.lei@redhat.com> <20181115085306.9910-19-ming.lei@redhat.com> <20181116021811.GM23828@vader> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181116021811.GM23828@vader> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 19 Nov 2018 09:18:18 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 15, 2018 at 06:18:11PM -0800, Omar Sandoval wrote: > On Thu, Nov 15, 2018 at 04:53:05PM +0800, Ming Lei wrote: > > Since bdced438acd83ad83a6c ("block: setup bi_phys_segments after splitting"), > > physical segment number is mainly figured out in blk_queue_split() for > > fast path, and the flag of BIO_SEG_VALID is set there too. > > > > Now only blk_recount_segments() and blk_recalc_rq_segments() use this > > flag. > > > > Basically blk_recount_segments() is bypassed in fast path given BIO_SEG_VALID > > is set in blk_queue_split(). > > > > For another user of blk_recalc_rq_segments(): > > > > - run in partial completion branch of blk_update_request, which is an unusual case > > > > - run in blk_cloned_rq_check_limits(), still not a big problem if the flag is killed > > since dm-rq is the only user. > > > > Multi-page bvec is enabled now, QUEUE_FLAG_NO_SG_MERGE doesn't make sense any more. > > This commit message wasn't very clear. Is it the case that > QUEUE_FLAG_NO_SG_MERGE is no longer set by any drivers? OK, I will add the explanation to commit log in next version. 05f1dd53152173 (block: add queue flag for disabling SG merging) introduces this flag for NVMe performance purpose only, so that merging to segment can be bypassed for NVMe. Actually this optimization was bypassed by 54efd50bfd873e2d (block: make generic_make_request handle arbitrarily sized bios) and bdced438acd83ad83a6c ("block: setup bi_phys_segments after splitting"). Now segment computation can be very quick, given most of times one bvec can be thought as one segment, so we can remove the flag. thanks, Ming