Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp999320lqo; Thu, 9 May 2024 01:27:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUJhaN293T7rR1lLsDyENQjffbSXz9C2YzXbkgx9uR5c9EayYvlXRMzjSNHMo2MMcvdHnTEI2sZFP4K1qwGpwqhJJwHjxS8VHILup72Xw== X-Google-Smtp-Source: AGHT+IF3+cyvYjMNB3CtQH1/HGkeGULz+wb18h9bxWJdqMtf/nMzqtUOSMVyeVzeN70OBT00kKU2 X-Received: by 2002:a25:bc08:0:b0:de4:673f:da17 with SMTP id 3f1490d57ef6-debb9d88bb2mr5021629276.22.1715243222295; Thu, 09 May 2024 01:27:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715243222; cv=pass; d=google.com; s=arc-20160816; b=HhGVm7vBCe1y50GqJOiyaLOHmcMY+CYDVHMPLqI8HglS9zMlzZyi67yEVXjjAu/uqU L0hfaA6cRMe0KWBnH4KvyOA48OaiM0q4wXazek5RTeXroi7MyRv1RL1T+9t2wXmAESDV eCDVTg+QonS85VIoYBS4dc8rIW/9xsIVXR7cOMb800y1fqmuPf6+yFkz/KlGkUKpQRp6 Sgr0JLwgBaZcxlLXKZQYFOdXawR1ByX6mQI4cA2wQGmU/KiSHkmstIBIbn2LW+AotNus qFrSsNjrMgMBqPv+Eb6BE1wAVY80GGj6IID0iRLiSbyz6yeOdbo+4dezgBe+R16LCejn lCIw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=x3Xxg6i0FLAN0umHIWCwG93UHt8NFMOuUk41qzLUqYk=; fh=sIY5PdY5RieI1I38b8cixWw1Q3V1fzd+OwZvgLsEnbM=; b=ZTCGPupf/KEEpWDH61tqtsKqU8cKXpzeqrWjEVcE4WyFjCYroRgnvGedEm2TUtN1j9 2m4I2Ei7l+RurA6RFx6CQL4MXVYdefnsQANtRV7DBNEDHPEIBubsFt6HPJhYtaY+AEC8 pg+1WBv0Cz9RX91+85U1Ldj6EePn5zTHQC5GdYCZ7EXbQBArvSnIveffnPDe1yzVmb6X 5ecACkPYpiF6R8KoFqw4ojKooXn64FEeHloFv5aT7eJBWEg1KLvcXhEc+0H+SEV4YJ5R T+RrYSflucQhBp26qCMVzhvqysnrrVQfIgHp2jvv7EAG9uZ+JgHVLChxEe9MCbgAhcLt o3iQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=d9k3Xohb; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-174135-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174135-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43df567009esi8458171cf.316.2024.05.09.01.27.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 01:27:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174135-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=d9k3Xohb; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-174135-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174135-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7F3CC1C21D82 for ; Thu, 9 May 2024 04:50:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 301531494B4; Thu, 9 May 2024 04:49:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="d9k3Xohb" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4E902747D; Thu, 9 May 2024 04:49:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715230195; cv=none; b=BCjXOxe0Oa9542fw/UqQXY4T5vcOs8zMxCx7ihNJu1oKiYO/d3Eh929W80bhDyr3DpbfLfuzr0zmYwwE9pI+E/g2eRC55q6a9SOAlpFVblFM+MuKjehqJPB6G8NtbUIxpEgVfiDcXzsZAMgNyQ4n9UKB5Z3UEquJx/YJMp49ERc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715230195; c=relaxed/simple; bh=+AiojDAJmMoCc0Wxxh5jISkjo5+IH8X8Y3hjru7idxw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Gd3tEsR/YQv0byIK1xjrl8o5hHsNLMKfXXH2YrBPy+qRa3XHUzeq41uD/hGk9158kxvmhCMG8KcXCYFXTNlXVTOP2Wtw56iRtrxB49RwlFBFP+KGePBvwY9IrDGeqT/tLf/oSBQJ/pYPuAj3ZSgeLMiGhvl2GtDB0nWb5/WBe8g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=d9k3Xohb; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=x3Xxg6i0FLAN0umHIWCwG93UHt8NFMOuUk41qzLUqYk=; b=d9k3XohbzRhXOoELgdBEeA6f1S 3oOjwUmoqaRaQC0CvfU6k+88iGiYqGevi4D0Mjv1XT/tJ31yElVIPjyooqUNsndaV6nr1hGD5KD6Y hpVyEo5ud1SsOU0IbJ/27faXATUncL94DVq2aq/GP8tX02rBz5V+LazPctxgZmjT4XiNg5CteZelR F250+x02riIYTRrco+NPB3RdRCFIh0LOb6pIdqAbmqXgrCWDOGcloO9JUAvrLzhBGKhu3BAgULPxQ P+NUz6+r5CHQPlzEem7mdtAOYVy13sfKqnZcHBQZehzZ76EOcgOw/zp4uB68EXKz4VKifIE4VqybV dq8ZPucQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4vit-00000000LYS-0m4f; Thu, 09 May 2024 04:49:39 +0000 Date: Wed, 8 May 2024 21:49:39 -0700 From: Christoph Hellwig To: Pavel Begunkov Cc: Christoph Hellwig , Jason Gunthorpe , Mina Almasry , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-alpha@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-arch@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Richard Henderson , Ivan Kokshaysky , Matt Turner , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Andreas Larsson , Jesper Dangaard Brouer , Ilias Apalodimas , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Arnd Bergmann , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Steffen Klassert , Herbert Xu , David Ahern , Willem de Bruijn , Shuah Khan , Sumit Semwal , Christian =?iso-8859-1?Q?K=F6nig?= , Amritha Nambiar , Maciej Fijalkowski , Alexander Mikhalitsyn , Kaiyuan Zhang , Christian Brauner , Simon Horman , David Howells , Florian Westphal , Yunsheng Lin , Kuniyuki Iwashima , Jens Axboe , Arseniy Krasnov , Aleksander Lobakin , Michael Lass , Jiri Pirko , Sebastian Andrzej Siewior , Lorenzo Bianconi , Richard Gobert , Sridhar Samudrala , Xuan Zhuo , Johannes Berg , Abel Wu , Breno Leitao , David Wei , Shailend Chand , Harshitha Ramamurthy , Shakeel Butt , Jeroen de Borst , Praveen Kaligineedi Subject: Re: [RFC PATCH net-next v8 02/14] net: page_pool: create hooks for custom page providers Message-ID: References: <20240507164838.GG4718@ziepe.ca> <0d5da361-cc7b-46e9-a635-9a7a4c208444@gmail.com> <20240507175644.GJ4718@ziepe.ca> <6a50d01a-b5b9-4699-9d58-94e5f8f81c13@gmail.com> <20240507233247.GK4718@ziepe.ca> <1e2823db-504b-4829-856f-3f45a45ccada@gmail.com> <8ced4c49-d153-40fb-9e62-0a5784cfa864@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8ced4c49-d153-40fb-9e62-0a5784cfa864@gmail.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Wed, May 08, 2024 at 06:02:14PM +0100, Pavel Begunkov wrote: > Well, the example fell flat, but you don't use dmabuf when there are > no upsides from using it. For instance, when you already have pinned > pages, you're going to use pages, and there are no other refcounting > concerns. Sure. > Unless there is an advantage of dmabufs over FOLL_LONGTERM > that I don't know about when used with normal user pages. The advantages of using a dma-buf over FOLL_LONGTERM are: a) you pre-dma map, which is a significant performance advantage for IOMMU-based setups b) you support any dma-buf exported and not just user memory. This is primarily important for PCIe P2P, but there might be other useful exporters as well > > wish io_uring would have just implemented them from the start instead of > > the current fixed buffers that are not quite as useful by not > > pre-mapping DMA and not supporting P2P. > > fdget(dmabuf) would be horrible, I assume that's not the suggestion. I'm not even sure what you mean with that.