Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8058496ybi; Thu, 6 Jun 2019 06:06:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJstkY5fAviC2QvIrJ9Dtzx/t0CRKbjmLjRDrLzoXWzaGyUBKRViBC318Fl8Pd1ywE3TIs X-Received: by 2002:a63:2706:: with SMTP id n6mr3420698pgn.238.1559826418935; Thu, 06 Jun 2019 06:06:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559826418; cv=none; d=google.com; s=arc-20160816; b=bV+lU9vgpaGFZQM3KJIAaI6KcZvBbYh/iYu7rX1QRFzuA3K9jnSW1hEwI0HjyMO+hr F4aEWbiyYcrT/Dc3SWtuBGwBbLsIfcT4p7G3QXrqd6vuDDtXFm1Ec6l9XiTNlrl0W/pI hksbCRiT0b8JBKMucBkz0RzZ3FmRrcZKNcVRCh0LYsFViPyUiNjaXo5aoMToMrttcDrO Zbth+IDnP6aeZzPpoWx5D3eRfKZaVVsKvqpCBcdiWlQnk2Oeq1Eg1ja3z/LZ2rPIQb4e Kiqo6YgoR91LE/O2K1eXzf9CfOQu3l6jqcNAR/S16JrIYcTHUvAWrdJYdbd5g5sfCSSB pKHQ== 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:dkim-signature; bh=Pcms2hpiozX31D6cP+b+pcEmPCGLaGYLU1hDb/Ksv08=; b=LBCz+8ZU3QVmjeO7RWipsD8tvtH7I0z1AKUC+YocPpKPrRNvi9I24CO+2PxeUeXw+v 8TGt81CaOFtQ3b96auPqsFfg3TN/UnqZPrxYJGGsWKF6maQT+24SmsMRfLh0H6/1whba 4V4qBKvP8su47JD5bo6nHD5alT29B8D+mUbQigergf2/jzGnRqgW12c8k1Og2mXJCGiS 6xocYVZCabziEdORsnF659Vz6v6mUHYqT2mJdUlcpBXmoUhIdZcAUDPmD5EoSGNBigLj TZQfr8MxsjswjjRM4VIZ6xPXoQDxJ2Xx8oL15QNlOYhojt0ybasPOIJ7M4PGaNxBimk5 lvUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=MkdX75Ny; 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 cb5si1869638plb.172.2019.06.06.06.06.41; Thu, 06 Jun 2019 06:06:58 -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; dkim=pass header.i=@ziepe.ca header.s=google header.b=MkdX75Ny; 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 S1728449AbfFFM7i (ORCPT + 99 others); Thu, 6 Jun 2019 08:59:38 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:46639 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728234AbfFFM7h (ORCPT ); Thu, 6 Jun 2019 08:59:37 -0400 Received: by mail-qt1-f194.google.com with SMTP id h21so1193814qtn.13 for ; Thu, 06 Jun 2019 05:59:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Pcms2hpiozX31D6cP+b+pcEmPCGLaGYLU1hDb/Ksv08=; b=MkdX75Ny9LXeEDd7M2ULnDHXydpfH/hamtC61IJll/djUvPjzu3CL4xNMlr5cz6Q5w guXxPdUF+9pLJqSbeFYaU0ImdK+8nAij30U0KPUu6/8BURnKFaQs0UmduUvDZSZvS3t9 KBmMub0KUG4Vu/RcFYW7BchKnUQlRyD5eB/hRcBQ502FwMXpWw81+Pu+hLi173/AjDI5 NP7He53xnoEtj8xoDotmmQb52tCLcvzr3zPzMDREz/bS8CoABsqvoL1RwTYigpnE7jWm Us4tLj2+XhGrNSs+5OFv+xlEHIunotlG5e2WVBNFLJZ98kl/iklZykxEmFHo7iATuPWe rK7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Pcms2hpiozX31D6cP+b+pcEmPCGLaGYLU1hDb/Ksv08=; b=k/GkEnUvkk5ijMwV/m5QOl5fDm42v9fe50WWTuQdttTRBAGzv3Q88iMBOfNgOPbQ+B I9PMOISzs0ciktMY6E4PiV+20lN1gDR+Lepm2Ge1AI9nJg5Zp+qldCtZv4VwgX8SVKRY eTEizRfZ5EUnjbrr9Z+uxXln1+ib78ObY4UeLVJAbi0O3Le7Iyu+jRa8oFtHeU8ndoRj s27ii2DRKlMo3ylldkKl6x5x6UHmwMSY1YavateUl+vndCoX89VmNd0c/jKsJniROLo5 du82f8QWyXfXCssZ+tyVk004//B+gNFeyKNLNwhy0km2SUgSVMZ/Prjx4a3fdJvlGYEk VYdA== X-Gm-Message-State: APjAAAV/lIz9W73x26pXng67czA/CcuJdyTNE457CKx7IAO0mJ/H7baA rRCGLjvR6skJ4xLRZnLKzXuVWg== X-Received: by 2002:ac8:7a87:: with SMTP id x7mr32060230qtr.215.1559825976661; Thu, 06 Jun 2019 05:59:36 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-55-100.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.55.100]) by smtp.gmail.com with ESMTPSA id f67sm934787qtb.68.2019.06.06.05.59.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Jun 2019 05:59:35 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1hYrzT-00057B-B5; Thu, 06 Jun 2019 09:59:35 -0300 Date: Thu, 6 Jun 2019 09:59:35 -0300 From: Jason Gunthorpe To: Christoph Hellwig Cc: Jens Axboe , Sebastian Ott , Sagi Grimberg , Max Gurtovoy , Bart Van Assche , Ulf Hansson , Alan Stern , Oliver Neukum , linux-block@vger.kernel.org, linux-rdma@vger.kernel.org, linux-mmc@vger.kernel.org, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org, megaraidlinux.pdl@broadcom.com, MPT-FusionLinux.pdl@broadcom.com, linux-hyperv@vger.kernel.org, linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH 08/13] IB/iser: set virt_boundary_mask in the scsi host Message-ID: <20190606125935.GA17373@ziepe.ca> References: <20190605190836.32354-1-hch@lst.de> <20190605190836.32354-9-hch@lst.de> <20190605202235.GC3273@ziepe.ca> <20190606062441.GB26745@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190606062441.GB26745@lst.de> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 06, 2019 at 08:24:41AM +0200, Christoph Hellwig wrote: > On Wed, Jun 05, 2019 at 05:22:35PM -0300, Jason Gunthorpe wrote: > > On Wed, Jun 05, 2019 at 09:08:31PM +0200, Christoph Hellwig wrote: > > > This ensures all proper DMA layer handling is taken care of by the > > > SCSI midlayer. > > > > Maybe not entirely related to this series, but it looks like the SCSI > > layer is changing the device global dma_set_max_seg_size() - at least > > in RDMA the dma device is being shared between many users, so we > > really don't want SCSI to make this value smaller. > > > > Can we do something about this? > > We could do something about it as outlined in my mail - pass the > dma_params explicitly to the dma_map_sg call. But that isn't really > suitable for a short term fix and will take a little more time. Sounds good to me, having every dma mapping specify its restrictions makes a lot more sense than a device global setting, IMHO. In RDMA the restrictions to build a SGL, create a device queue or build a MR are all a little different. ie for MRs alignment of the post-IOMMU DMA address is very important for performance as the MR logic can only build device huge pages out of properly aligned DMA addresses. While for SGLs we don't care about this, instead SGLs usually have the 32 bit per-element length limit in the HW that MRs do not. > Until we've sorted that out the device paramter needs to be set to > the smallest value supported. smallest? largest? We've been setting it to the largest value the device can handle (ie 2G) Jason