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 9D580C25B50 for ; Mon, 23 Jan 2023 22:47:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 375D96B0071; Mon, 23 Jan 2023 17:47:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 325DA6B0072; Mon, 23 Jan 2023 17:47:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1EDA36B0074; Mon, 23 Jan 2023 17:47:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 064F56B0071 for ; Mon, 23 Jan 2023 17:47:06 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id BC12940609 for ; Mon, 23 Jan 2023 22:47:05 +0000 (UTC) X-FDA: 80387550810.13.87F0650 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf13.hostedemail.com (Postfix) with ESMTP id 994B720018 for ; Mon, 23 Jan 2023 22:47:03 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Wec3MZQ4; spf=none (imf13.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1674514024; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=LdoL9WInNn9g+7kuigf9617DZzkmnyUk0PPwEqtnDNs=; b=40L5HedGUbWHmo+iSYfonBMEJSmUjNVojS8YW0QxvjwVYGnW6rrhf92yHLNqasFrcM/kXd +a9j7OxMQgCUOa85+bT93pzwvGQgowhUoGVgiQmLErPx5ZKB7xFRX2TQtt7o6Amo0RF6ep 3wdsS0F4fTz9uf3Iz3P78XOx0S4mMJU= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Wec3MZQ4; spf=none (imf13.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1674514024; a=rsa-sha256; cv=none; b=udoYffK8EslbrRwJtC1qRVDeGrOCPHsh/2Kmk1M0HauPu6Wxht+Lks+K6Lsqq6jTPvXAMl +2efc0Cp73eir5es3d5TiptFKyj+wQEQCF/fBZvroTI2ydz0oxVuoOWfOyjX27+tfiVpyi 0O70atzDQhktc0aVoJa+LY1D2u90/L8= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=LdoL9WInNn9g+7kuigf9617DZzkmnyUk0PPwEqtnDNs=; b=Wec3MZQ4Im+pfSZhNixMoikgQp dmKOI1VP02JxTetKhMElCRQohV5UlH7bhT0BzBqDbpvYyuJYJWxjXRxbgvhpmeUlzdCIQFeuKq/A0 jCu0V4X2OYa1fc5HkzlSNF/fHViupU5ybyDv7lCZbWBVBHYVW8M+USztiscjCz+X+nAUnDTxEisH5 71HMkc7qFGE4VRVNmLKFEizQCLLWsJX+lovKSQVkUc7p3kV9EZQljwmNOGfSh4d1U/PYToPKA1QbI n0eZstbbByNQIOrRWB8Kpy8kAFlH6RUnzb9MT7/zm0BKA8LENilntYWJHHi06b8R2qWJKVB4mgozr IbueYMUQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pK5aM-004aMF-EK; Mon, 23 Jan 2023 22:46:42 +0000 Date: Mon, 23 Jan 2023 22:46:42 +0000 From: Matthew Wilcox To: Dan Williams Cc: nvdimm@lists.linux.dev, lsf-pc@lists.linuxfoundation.org, linux-rdma@vger.kernel.org, John Hubbard , dri-devel@lists.freedesktop.org, Ming Lei , linux-block@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux.dev, netdev@vger.kernel.org, Joao Martins , Jason Gunthorpe via Lsf-pc , Logan Gunthorpe , Christoph Hellwig Subject: Re: [Lsf-pc] [LSF/MM/BPF proposal]: Physr discussion Message-ID: References: <63cee1d3eaaef_3a36e529488@dwillia2-xfh.jf.intel.com.notmuch> <63cef32cbafc3_3a36e529465@dwillia2-xfh.jf.intel.com.notmuch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <63cef32cbafc3_3a36e529465@dwillia2-xfh.jf.intel.com.notmuch> X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 994B720018 X-Stat-Signature: edobyzciarsgchyhasqbzxjp43zspe8d X-Rspam-User: X-HE-Tag: 1674514023-332101 X-HE-Meta: U2FsdGVkX1/PJ8GqGR4w6N8MBOAIzCwWZEJpaMU6LU5XaND6o32pEtNdoZSTGusat2jxwccFU+xfaf4OzsJRjQ+bk8H66vOk0qIFndf9mAtPcxZ+rJHuKHT+JbnosWXhuogAWCfAzQBuyaY4Kdsd7bDk6s+9aooxuzfqU7COigUV8p2NKwHaqj/s3dd2z56fAt63XqP4xuiYqlmXmBgkHYpxnkpEUlo6FfF13O4dzNPfKidDUfvVmmnIvTQOHPhJ5ahdul/3RbFVR57hORm2W1YdNUlksOdxT201igr9sXxHSMyZCguifE/Uay0bAfcNbd2cXBzX9Dg9QXHBaIJ/fIJWz7USeAgcr9tEDiqJdKjPTSbUvutWS4/h8ZDlqJPtrUK021oUVQjJVPkW940eBHEJEDSrnMWz8CKlGISMjhojuNR/CnH5dophnwpKiJi6zeatIwB0TYWZwGLBp9jVq9+7Y6taLzF/AGXaPZlnRRdMf8+I0KeJJozxL//5fFBVW9lXZANfpKvxSFGosdyP1J+IASzrFuNX+F7EucpiKJgqd1HhmGgWKakqYmNdfJ7W9nYMKjvJZedDO02Isjxpfxx0St0n+Ss4REqwvCXJHE3MKxn/4TwU6pPhDOEsPkGX+n8scFKzkYYk0D7GFlnQ8bDTYqZRDoxAKRoWmg1xYh7/jyME57LOFHbr4tbORuqE12QVXQTw/SUjzftN6hSefjHVCwMp8k2oAJGoZva9Q6ArgTEUVZFqrRb5P+jHS9iBwvhRx+F/o/y5Z0nPf/l4PdGDhSaDUD8D4aBRlaJr6pCQdMsex/gcXc9OGt9I4BV/dA6ZP2rWVr20gj3bPk5RwVN3YgqfFN5GzlZRh6alFivdLCJyzDCJ3EbRygjnmGf+B7ZzY3U105iCiXahLwlpuTF+cWej4Ziee8wDGr4o1Hx7SlaUWnMVNDjTETGyoTQuFkQwjUlnjQKnjruSb/I JoJ9paxY vfsUFUjSsBKa/nJl/32QoMy6ZnhmvQbt4ErrVP8T6B3I/P43G8BQ0euN7NtYWZYroA3IApwSWLuHA6/ejF7YQKlQlLdHFzVVAqhhT0GoxlR0+sDIrtAZwQm8KkKzsIJgKc+S+iDoi8EUzTo/k/z/XUESV0Al1XCxBn88/e3Na7n4n+lqg9Unia8WNLLoIWUqnS2RZEMk+K4pN6jJ6OF6meoQyq6pZgQjmI0H4JGJ+HfRRt9N7wKQN2RvfSn87irPsrLqff91UV0VGNIq41t3vfwhAd8/lj82KWhwVlgtbP6cAJ9Y= X-Bogosity: Ham, tests=bogofilter, spamicity=0.004702, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jan 23, 2023 at 12:50:52PM -0800, Dan Williams wrote: > Matthew Wilcox wrote: > > On Mon, Jan 23, 2023 at 11:36:51AM -0800, Dan Williams wrote: > > > Jason Gunthorpe via Lsf-pc wrote: > > > > I would like to have a session at LSF to talk about Matthew's > > > > physr discussion starter: > > > > > > > > https://lore.kernel.org/linux-mm/YdyKWeU0HTv8m7wD@casper.infradead.org/ > > > > > > > > I have become interested in this with some immediacy because of > > > > IOMMUFD and this other discussion with Christoph: > > > > > > > > https://lore.kernel.org/kvm/4-v2-472615b3877e+28f7-vfio_dma_buf_jgg@nvidia.com/ > > > > > > I think this is a worthwhile discussion. My main hangup with 'struct > > > page' elimination in general is that if anything needs to be allocated > > > > You're the first one to bring up struct page elimination. Neither Jason > > nor I have that as our motivation. > > Oh, ok, then maybe I misread the concern in the vfio discussion. I > thought the summary there is debating the ongoing requirement for > 'struct page' for P2PDMA? My reading of that thread is that while it started out that way, it became more about "So what would a good interface be for doing this". And Jason's right, he and I are approaching this from different directions. My concern is from the GUP side where we start out by getting a folio (which we know is physically contiguous) and decomposing it into pages. Then we aggregate all those pages together which are physically contiguous and stuff them into a bio_vec. After that, I lose interest; I was planning on having DMA mapping interfaces which took in an array of phyr and spat out scatterlists. Then we could shrink the scatterlist by removing page_link and offset, leaving us with only dma_address, length and maybe flags.