From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A31FBC433F5 for ; Thu, 20 Jan 2022 13:39:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3558E6B0098; Thu, 20 Jan 2022 08:39:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 305A96B0099; Thu, 20 Jan 2022 08:39:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1CD766B009A; Thu, 20 Jan 2022 08:39:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 0AD2D6B0098 for ; Thu, 20 Jan 2022 08:39:20 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id AC2441814758B for ; Thu, 20 Jan 2022 13:39:19 +0000 (UTC) X-FDA: 79050772038.13.AB164CC Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf23.hostedemail.com (Postfix) with ESMTP id DAD9614007B for ; Thu, 20 Jan 2022 13:39:15 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 906E668BEB; Thu, 20 Jan 2022 14:39:11 +0100 (CET) Date: Thu, 20 Jan 2022 14:39:11 +0100 From: Christoph Hellwig To: Matthew Wilcox Cc: linux-kernel@vger.kernel.org, Christoph Hellwig , Jason Gunthorpe , Joao Martins , John Hubbard , Logan Gunthorpe , Ming Lei , linux-block@vger.kernel.org, netdev@vger.kernel.org, linux-mm@kvack.org, linux-rdma@vger.kernel.org, dri-devel@lists.freedesktop.org, nvdimm@lists.linux.dev Subject: Re: Phyr Starter Message-ID: <20220120133911.GA11052@lst.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Rspamd-Queue-Id: DAD9614007B X-Stat-Signature: hen361az3ctsg17scqb7y1j9fr9hn5ch Authentication-Results: imf23.hostedemail.com; dkim=none; spf=none (imf23.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de; dmarc=none X-Rspamd-Server: rspam08 X-HE-Tag: 1642685955-932010 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jan 10, 2022 at 07:34:49PM +0000, Matthew Wilcox wrote: > TLDR: I want to introduce a new data type: >=20 > struct phyr { > phys_addr_t addr; > size_t len; > }; >=20 > and use it to replace bio_vec as well as using it to replace the array > of struct pages used by get_user_pages() and friends. FYI, I've done a fair amount of work (some already mainline as in all the helpers for biovec page access), some of it still waiting (switching more users over to these helpers and cleaning up some other mess) to move bio_vecs into a form like that. The difference in my plan is to have a u32 len, both to allow for flags space on 64-bit which we might need to support things like P2P without dev_pagemap structures. > Finally, it may be possible to stop using scatterlist to describe the > input to the DMA-mapping operation. We may be able to get struct > scatterlist down to just dma_address and dma_length, with chaining > handled through an enclosing struct. Yes, I have some prototype could that takes a bio_vec as input and returns an array of struct dma_range { dma_addr_t addr; u32 len; } =D0=86 need to get back to it and especially back to the question if this needs the chaining support that the current scatterlist has.