Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp407908imu; Mon, 5 Nov 2018 02:56:54 -0800 (PST) X-Google-Smtp-Source: AJdET5cDjhmYrnvSOVHN7oNENjNZfXFuNfT9OIcfPQcYSZV3AO+WoNhkSBsIYQypuxs5w6MSTCGD X-Received: by 2002:a17:902:24a5:: with SMTP id w34-v6mr21351483pla.91.1541415414303; Mon, 05 Nov 2018 02:56:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541415414; cv=none; d=google.com; s=arc-20160816; b=qd4Uu+iUCY0XZQS61FUl/Zuhan8PZegOOU0pctqmOJxf7pBF4bUtGyn/v0J+nrn10+ KZJJUTeMb36gZRuKrhMlEZOYrg+fPZGFCqEFeNKXeGxD85iu2v0VdlFAljqm7aXpcY/f fAF8VNAXjbZPC2fEaunq72WHjFX3B10/m0NwqJ6Z2IFGxZWxtMtHOLPjL7kBF3KEnwL8 7ZDBJSsVvGoOG3I6ZA9dCnI81DuB9t1XnvZLqhzfeVJLdgqyfntNYpW10ACagIrj5O0i x6tx+qvFbL7nvAHa7FcqreAY5jmNt/5ezai7WPbbkW6S4bvjYgB4y4n1SWQOkXEZx9E+ BcZA== 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=vSFpggbUuzvmjkRaSC207w83Np7c1x1KbkayQAhIzgM=; b=an7fWeSD6Pqa4MSsbWjJ+gii16CX5KQ4bMsfMp0+y4jdAOs7fTJMOTxyNBX6VLQofR POaFKNgCLWgLKMpZN0CxT275loHW4Ns6DC/4Afsv90vjFp1X6r9WYdLkN/go6LIe5ev5 2pwzLtQ9h1MGytHrjk1DlH6fvmYRMQrj3HeKPafJx9PmEUjuHzfX6+Jy/qoXCrwrsP1S Zat7pXYlSn+R6spdNfczuJzn3+r7zC30tUT4wUIXTQLiW1ndGW7AQRxa6TZYItpqCyof Cwey7QPeliBUEOLUOJ8kb6LO7OeAn0MWpWWaSASensx1lHoPQV5gXGgZJ+IG+ezwv8Sl i8iw== 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 w64-v6si39369475pfw.101.2018.11.05.02.56.39; Mon, 05 Nov 2018 02:56:54 -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 S1728961AbeKEUPJ (ORCPT + 99 others); Mon, 5 Nov 2018 15:15:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51988 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726255AbeKEUPJ (ORCPT ); Mon, 5 Nov 2018 15:15:09 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D65AA30820D8; Mon, 5 Nov 2018 10:56:01 +0000 (UTC) Received: from ming.t460p (ovpn-8-33.pek2.redhat.com [10.72.8.33]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 75DEA104C529; Mon, 5 Nov 2018 10:55:54 +0000 (UTC) Date: Mon, 5 Nov 2018 18:55:50 +0800 From: Ming Lei To: Johannes Thumshirn Cc: Jens Axboe , Linux Block Layer Mailinglist , Hannes Reinecke , Linux Kernel Mailinglist , Jan Kara , Sagi Grimberg Subject: Re: [PATCH] block: respect virtual boundary mask in bvecs Message-ID: <20181105105548.GC12367@ming.t460p> References: <20181105102301.9752-1-jthumshirn@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181105102301.9752-1-jthumshirn@suse.de> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 05 Nov 2018 10:56:01 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 05, 2018 at 11:23:01AM +0100, Johannes Thumshirn wrote: > With drivers like iSer we are seeing a lot of bio splitting and smaller I/Os > being submitted to the driver. > > The root cause of this issue that the virtual boundary mask code does not take > into consideration that some of the memory segments in the SG list may have > come from a huge memory page that is being managed in the SG list as 4K I guess you mean something like 64K PAGE_SIZE, instead of huge page. > blocks. This means that many of the segments in the SG list will have an > offset into the page that is not 0 but will be a multiple of 4K. > > Cc: Jan Kara > Cc: Sagi Grimberg > Signed-off-by: Johannes Thumshirn > --- > block/blk-merge.c | 2 +- > block/blk.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/block/blk-merge.c b/block/blk-merge.c > index 6b5ad275ed56..208658a901c6 100644 > --- a/block/blk-merge.c > +++ b/block/blk-merge.c > @@ -46,7 +46,7 @@ static inline bool bio_will_gap(struct request_queue *q, > bio_get_first_bvec(prev_rq->bio, &pb); > else > bio_get_first_bvec(prev, &pb); > - if (pb.bv_offset) > + if (pb.bv_offset & queue_virt_boundary(q)) > return true; The change should only make difference in case that PAGE_SIZE is bigger than 4K. If yes, please add the description in commit log. Thanks, Ming