Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp526407lqp; Tue, 11 Jun 2024 11:09:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU8TnrWcUgwI3HaAV6KWCw0/s42b0UN83lEK/cPpv3/viLpgjGVVlxAAKgJ8wtmjnJYnvEn775o7SKSilLoBNBvUpeqebc7P7M5ItaFzQ== X-Google-Smtp-Source: AGHT+IG2aXja/WRcuypJhe2zL9Igax4oTA06ovy+z0XPEgjwT8OUv0J4yrlMwG+WO7dHmtGEzJDJ X-Received: by 2002:a17:906:a407:b0:a6f:f7c:5c7a with SMTP id a640c23a62f3a-a6f0f7c5dedmr508859666b.67.1718129392463; Tue, 11 Jun 2024 11:09:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718129392; cv=pass; d=google.com; s=arc-20160816; b=fHq26eJgBBDCxGWJw6hKH+YWXQir+3ZOm4JZEN20HDNKhkdTxUUSo3wfAHi9UPai6w BKr6jF4TL9liR3JUkUPcZ8+AmsuGY/mdJqODlbque6/iCRRHP9UsU9E7oMBqrpN1Vwxl 6m6cDiDJov7cEmzhrFM2IWjiK2kgwsrF2TenKizlsn+YIGFUyzIF270Dc0VVST5EnxMM HSSi3ARLxgPxpvOUuiBMbRG7hDDVDw5dSvynRVISbDwCBlnrrOYx6ip6RaajBZQ42fN3 43aOr7xPLTmFjJsDtA9mC4DbyhTRVgAHYllkhmHtoqxxWIls6ZVOAEnVUnJ9z4VaHv7K KKZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=+lxPetrPpHvENSTokBRC6xognbIAj4RmicEAyuXDxTU=; fh=KEAye5qQl9DYf/UMAEk3UN+wbz9u+BBbwOWin57KW5g=; b=hYY9iM280CQS15XyJq8syM6C+sp8FY2DZ14AWPb1Dnyo6YfWNl9V3bO6EtEAOofavZ oculrhH/xHlUyLQYOo5sTkIXbRshq7aNlvQmOaseHt4z4I53XouSUDZk6W4th08GJC22 iQ6VuNkP1vcd0FxFki0lWs5fhF1WhyU4niwzzVRlLHlqSGwijAl7tyIVJnsWMCIZaNww dJqvlkk4wWNY9vbkW9X1lQdYPYK0f7CmktN7tSBIrDJSLYB8ic1LCRLi15qzeBIAVY3E IKmT94v92cW9oTUKdqPLEfO9zDXkwTjNtcnc5np1iABuMQK1BvYlxiHbJC6du3QDhCbN UxHg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ORBH1T28; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-210400-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210400-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f17c80169si269855066b.873.2024.06.11.11.09.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 11:09:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210400-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ORBH1T28; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-210400-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210400-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id E50951F24717 for ; Tue, 11 Jun 2024 18:09:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F1EB55BAFC; Tue, 11 Jun 2024 18:09:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ORBH1T28" Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 23C4138FA1 for ; Tue, 11 Jun 2024 18:09:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718129374; cv=none; b=pf8b5ExAcJAC6nMd3/pSrm2gBx39ApWOa9MWTuwOv0LCH5HSoSJgdo6wHARcgq1pJJs/oM6WnMAE/AwcYYF6XoDnyENp38weRmkjHumxeabhP184mYRc149324tsgRci1f3neXka3ld97cTEb/T8kJRuzQzMsKHhDRfRCdpJiyM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718129374; c=relaxed/simple; bh=+lxPetrPpHvENSTokBRC6xognbIAj4RmicEAyuXDxTU=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=kQM6KKznUHizFz6FOsjxLcbkk3rXmZV/rk3jSZY6SBfvHgb6fuYC2mHDaXrWImcOLgf+XpCgR26tu06G97HwamPfWt8D4iWhsX/jzUb9x/lSCZ5B2xGE+3/SxlQIdXzQMvuzEXEaS3HaEkJ3Petb0zVPCIq0oS0NBTQLXcHFo1Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ORBH1T28; arc=none smtp.client-ip=209.85.218.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a6f11a2d18aso347239366b.2 for ; Tue, 11 Jun 2024 11:09:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1718129370; x=1718734170; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+lxPetrPpHvENSTokBRC6xognbIAj4RmicEAyuXDxTU=; b=ORBH1T28Kv+Gm9vfDRFh0o9KoHNuPBRhIxafHB3qgyANZSEAx+9LLa6Wv5Iv2FulVM 1C4r4QsMP/tolax4DaWy4QrJlMTPTRDUpbMg8JdQqiADkwRyXa1Iy11Ylt5B7YbjRIRq OctBI7JiWrNqmKnqBVdhpMRueuExFqKOmwSK+7OfBSrsjK4SgORfTkvjgaMoS3DMo0Q7 FkTsN8QksrcUNYzFDEG1UmAfTCd8yxst6SYakYd6YSlIZ9FEq+7SBeD6XMUjZNk9BCcy Wrv4JJvkiSqmCMz3b9EpLjg4cplFB6acY4gYixvwk4VoXVVCe+PzWeGjji2mognTN5AY C0/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718129370; x=1718734170; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+lxPetrPpHvENSTokBRC6xognbIAj4RmicEAyuXDxTU=; b=hXUE8SAlpJMy4b5zUYylQBPxqKYAsYXTDPZsuEEkLbQTdSSkq9vwCrrkHy+bkJOStW AsEPEyAvHuoHKbhJj4lXL+24GEdqy//zF/OgXYhCPt9WqnKdz74fQ+tMzjpG/HzZ+Xc7 2ataEoakrEdEQRYbk9TKjOmL7oUobXcCZxthED3JNKZEpBVI/zC9R1kETSFiEouL7Exy mnNRcxwp2pdnq8vGc/C+FOCPiUIthjL0Bi4a3crIwSN3VX3/XTwGpLSnyB0s//aexR4V mwRGcxTD5PYR4zkx0nh4OdCCBy5DILUvTTUCiuPOyHrJ0ZkwExrBe8cROTqoxnzq1bVK D29g== X-Forwarded-Encrypted: i=1; AJvYcCW7IruzCbndtvLVB/ZvqbB1ddMcqznQspFcEsBxuLqsU7bdPvYnvynGakaQzvHBMIxCuuuShxCIDI+aFK0yHYpbYA3dPHXo7UAfAxXj X-Gm-Message-State: AOJu0YxI9wdC/6OrBzwuMlF1/fDZFKkFMoE+TuJCHO8/iZa32oPILofn aWVUZLvz6z5iT77qoenKCqmuN1DYtK+yWVwizXi2Psl0dloPv2456mX9pY1qs++m3VacHIIi/Ar 7YbRs5APA3k4Cx/11m4ticPmblmb2PQtxXDMf X-Received: by 2002:a17:906:4742:b0:a6f:393a:9dea with SMTP id a640c23a62f3a-a6f393aa161mr132795366b.77.1718129370030; Tue, 11 Jun 2024 11:09:30 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <5aee4bba-ca65-443c-bd78-e5599b814a13@gmail.com> <20240607145247.GG791043@ziepe.ca> <45803740-442c-4298-b47e-2d87ae5a6012@davidwei.uk> <54975459-7a5a-46ff-a9ae-dc16ceffbab4@gmail.com> <20240610121625.GI791043@ziepe.ca> <59443d14-1f1d-42bb-8be3-73e6e4a0b683@kernel.org> <00c67cf0-2bf3-4eaf-b200-ffe00d91593b@gmail.com> <20240610221500.GN791043@ziepe.ca> In-Reply-To: <20240610221500.GN791043@ziepe.ca> From: Mina Almasry Date: Tue, 11 Jun 2024 11:09:15 -0700 Message-ID: Subject: Re: [PATCH net-next v10 02/14] net: page_pool: create hooks for custom page providers To: Jason Gunthorpe Cc: Pavel Begunkov , David Ahern , David Wei , Christoph Hellwig , 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 , Donald Hunter , 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 , Willem de Bruijn , Shuah Khan , Sumit Semwal , =?UTF-8?Q?Christian_K=C3=B6nig?= , Yunsheng Lin , Shailend Chand , Harshitha Ramamurthy , Shakeel Butt , Jeroen de Borst , Praveen Kaligineedi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jun 10, 2024 at 3:15=E2=80=AFPM Jason Gunthorpe wrot= e: > > On Mon, Jun 10, 2024 at 08:20:08PM +0100, Pavel Begunkov wrote: > > On 6/10/24 16:16, David Ahern wrote: > > > > > There is no reason you shouldn't be able to use your fast io_uring > > > > completion and lifecycle flow with DMABUF backed memory. Those are = not > > > > widly different things and there is good reason they should work > > > > together. > > > > Let's not mix up devmem TCP and dmabuf specifically, as I see it > > your question was concerning the latter: "... DMABUF memory registered > > through Mina's mechanism". io_uring's zcrx can trivially get dmabuf > > support in future, as mentioned it's mostly the setup side. ABI, > > buffer workflow and some details is a separate issue, and I don't > > see how further integration aside from what we're already sharing > > is beneficial, on opposite it'll complicate things. > > Again, I am talking about composability here, duplicating the DMABUF > stuff into io_uring is not composable, it is just duplicating things. > > It does not match the view that there should be two distinct layers > here, one that provides the pages and one that manages the > lifecycle. As HCH pushes for pages either come from the allocator and > get to use the struct folio or the come from a dmabuf and they > don't. That is it, the only two choices. > > The iouring stuff is trying to confuse the source of the pages with > the lifecycle - which is surely convenient, but is why Christoph is > opposing it. > Just curious: in Pavel's effort, io_uring - which is not a device - is trying to share memory with the page_pool, which is also not a device. And Pavel is being asked to wrap the memory in a dmabuf. Is dmabuf going to be the kernel's standard for any memory sharing between any 2 components in the future, even when they're not devices? As in you expect dmabuf exporters which are not devices to be added to the kernel? Currently the only dmabuf exporter which is not a device (AFAIK) is udmabuf, which is used for testing and emulation, not really a production thing, I think. --=20 Thanks, Mina