Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp217226imm; Mon, 1 Oct 2018 08:53:29 -0700 (PDT) X-Google-Smtp-Source: ACcGV60QQ/XqOwLEMt6NiOWxgu660+XXEyb6dNbdMSCtCRgl2EWUs/dkh5NXZMwogRaMyeNmweEv X-Received: by 2002:a63:3cc:: with SMTP id 195-v6mr10992292pgd.262.1538409209523; Mon, 01 Oct 2018 08:53:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538409209; cv=none; d=google.com; s=arc-20160816; b=zYE6faVDVCLJR07jTTVgmeWwMlPnvH5FJkZI3F5Bg7VgTQ5KxmEVYHZPDggGT2hJDH cv+tLKe6rD+2fi/LEUVgYxjUztkWP2DDidvVq50/ac1zemPWLLNj4JsO3sS1qxG10Ufy FZ9u94jiduazv3VDqK0HPq6sB5LQNP9xaMKR4HhHcphpfUNOZqrzgHrsCkxVCsD2qbmB S1EuJWP/85/tK53QaoDjX8dOhSfleqztKe9y4MAK7L9jg3HLuAI1D693f0oo8O08FlEy YnByeX3baraXmghXdslc5CR9AvEIDnND8LWTCcs5hIRjfAda25G0IhX6AgMVYJP9ldBZ rDNw== 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=YvJu2YggMvLwkf+KcRSyKAyF/gQXmYEtqQKuIvF8MVQ=; b=UEmQktsXZtoFmMnZ5Z/t6CiRwOSA/o8fkT9jNAqZQnB5fHM0a384r7WzoBDkzm58tb lIDKGueWPlvraW1RlOW3TIi2d10WJiUIUMAfGHLMKJtYbSDD3HMjwYMEdB2idUNkrdCq UfP1n3sFySYfq/64RGL+gvRWFl+FsGFV3TxzHFdTpFqFBQw2cf3rrx6xJqeushkUTmJV xD4M8+CT2AYWyQLgZ+Iyc/XDl58qPMOvDHQ3EhWTdGSoSkX9ICgmj/BOhw4i39I7HX+w NBM5Smv+xBLMgqrVllq6QVuaU+4OwYD2FMqysmnpjx6Xd22j2KJdD7tB9SVFE3k5Qso/ ouZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=o1AXa+Up; 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 m5-v6si13811849pfb.104.2018.10.01.08.53.15; Mon, 01 Oct 2018 08:53:29 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=o1AXa+Up; 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 S1726243AbeJAWaU (ORCPT + 99 others); Mon, 1 Oct 2018 18:30:20 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:36726 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725994AbeJAWaU (ORCPT ); Mon, 1 Oct 2018 18:30:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=YvJu2YggMvLwkf+KcRSyKAyF/gQXmYEtqQKuIvF8MVQ=; b=o1AXa+UpcBHCFCF48zZwDNYcl poCpiYC0zqM2gkfynrpsd7wUQZNPaJva0aKgj779cnLo/Pl3CSEL1BIwMP+KgP2GfRjFHP9/GpPkV GTLXSxCa5MomMMJSRYl2BIZXw6h1DUjzk44aBreyQguT5fCmMHlB/lqzSNQJh5HHm6aGvSHxH0w2r 4HQzNm6vQOPbf/XnmQScnh58ERowipCJWt8Ftpz1djvhWybmaVIXRo/kabEqkPQ2FxGjGJg/F6gcH vge+12a4WD1zkA+VBjVPmr+jUY+XvEmCO0WGZIeQ9JDj2OSU/Hrsmy8oW8269qH0VovuTUXYbiu8G EpHGrSEqg==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1g70U6-0001Hw-Be; Mon, 01 Oct 2018 15:51:46 +0000 Date: Mon, 1 Oct 2018 08:51:46 -0700 From: Christoph Hellwig To: Matthew Wilcox Cc: Christoph Hellwig , John Hubbard , Jason Gunthorpe , john.hubbard@gmail.com, Michal Hocko , Christopher Lameter , Dan Williams , Jan Kara , Al Viro , linux-mm@kvack.org, LKML , linux-rdma , linux-fsdevel@vger.kernel.org, Doug Ledford , Mike Marciniszyn , Dennis Dalessandro , Christian Benvenuti Subject: Re: [PATCH 3/4] infiniband/mm: convert to the new put_user_page() call Message-ID: <20181001155146.GA30236@infradead.org> References: <20180928053949.5381-1-jhubbard@nvidia.com> <20180928053949.5381-3-jhubbard@nvidia.com> <20180928153922.GA17076@ziepe.ca> <36bc65a3-8c2a-87df-44fc-89a1891b86db@nvidia.com> <20180929162117.GA31216@bombadil.infradead.org> <20181001125013.GA6357@infradead.org> <20181001152929.GA21881@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181001152929.GA21881@bombadil.infradead.org> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 01, 2018 at 08:29:29AM -0700, Matthew Wilcox wrote: > I don't understand the dislike of the sg list. Other than for special > cases which we should't be optimising for (ramfs, brd, loopback > filesystems), when we get a page to do I/O, we're going to want a dma > mapping for them. It makes sense to already allocate space to store > the mapping at the outset. We don't actually need the space - the scatterlist forces it on us, otherwise we could translate directly in the on-disk format and save that duplicate space. I have prototypes for NVMe and RDMA that do away with the scatterlist entirely. And even if we are still using the scatterlist as we do right now we'd need a second scatterlist at least for block / file system based I/O as we can't plug the scatterlist into the I/O stack (nevermind that due to splitting merging the lower one might not map 1:1 to the upper one). > [1] Can we ever admit that the bio_vec and the skb_frag_t are actually > the same thing? When I brought this up years ago the networking folks insisted that their use of u16 offset/size fields was important for performance, while for bio_vecs we needed the larger ones for some cases. Since then networking switched to 32-bit fields for what is now the fast path, so it might be worth to give it another spin. Than should also help with using my new bio_vec based dma-mapping helpers to batch iommu mappings in networking, which Jesper had on his todo list as all the indirect calls are causing performance issues.