Received: by 2002:a05:7208:20d2:b0:82:bbfa:f723 with SMTP id z18csp58054rbz; Tue, 7 May 2024 10:26:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUs8LEcXgL5VhDGcvS9ReUxI+gjQpWP5kdgH+17ojrAWJTU8Yxf6ReEI71aps96O7oWGVUOz7rwdcFbfA6dR3MnVGbSadcve0U8yJ0B3g== X-Google-Smtp-Source: AGHT+IGbETpOHvxk+bH6FJmrHDw1bBXZg7ZLLlMC6ZnrYTlooJeEClhwpqJwKGZy0vApIbn0aPsI X-Received: by 2002:a17:907:11c2:b0:a59:cf38:5338 with SMTP id a640c23a62f3a-a59fb94b5famr8271866b.19.1715102770798; Tue, 07 May 2024 10:26:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715102770; cv=pass; d=google.com; s=arc-20160816; b=0Gls+Mi9P8+K0EdUbMfdZV1pdqRAVB92OboMAWBkUnJVzVUpQwIayLa9sUql65eDXC KJytxNwIqxTjhjWOfDIQeDI/2N3CzKKrIQ6PAQoAHWMfwXBpIymyY0QcXxz5MRtxtbJ8 uEsNkt5vb6F5+xBmZUGX+6Xf0tLCW/4qd+0VH5TBlU3jNWkl6/y9KEU4ORvuYV9Cisya 5m64e9OXqL3IPgSAI/StFX6rjuoDoBr6K2VSPL4rE5JEFpwJydTRO62WeUxrH9Kbd3XL hVGbvt3KeAyiD5oLvbd6+89T5t4LRVWAntdlMNsFr+0yth7W5tZe+xeov9bYIQR946NH qmpA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=hH2gwlX9CIjp5iuBC0nf4yhM48L0bVqOBBwTo5W8RyY=; fh=z6zvz3wc+kA9S2aT/Soj9CCN1ktSfbeSFqoBWYa4Vfc=; b=XOHL/lOi6CLul6U0cCaCy7qNCmRVRC8TqbH7FimQz65/wCszbwwTPgMpRixDaMtqJZ 1LptlGd8zOaGdhoxyTJ2LJe4U5eNrDH8CU795vmI9OwcYup8xSxXJOnUw3mD5JI9oshV Y7gZEhK1IE3GV/p9cVdufw66Y96pYgNkQD8ohX7B8J/cuzrqWTKBhOA0EKr8PvKLPIkK cVWxj3AxqGAeg63qSRF4DryhmdGeEyRJ/g9Ln4xDHkmGRZy+Nugtz4nDz64xSKLIUABQ XPCn39nNLkCv5ubHrJ+It2uTB0iipJYIbMX57GSunxBuhXtGes1DTLQ7Rz8Ts11KYmLw P8yg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jNrab5FI; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-171913-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171913-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id cm5-20020a170906f58500b00a599f3e765asi4929735ejd.893.2024.05.07.10.26.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 10:26:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171913-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jNrab5FI; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-171913-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171913-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 660281F25C74 for ; Tue, 7 May 2024 17:26:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E91216C867; Tue, 7 May 2024 17:25:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jNrab5FI" Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 D722810E6; Tue, 7 May 2024 17:25:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715102749; cv=none; b=Ld70IFOKKs7l9nV790HoykyeKVr7QCyvG/hRbtfFkardIeD1FCh5vyRpTu489vqTsv1HjZ7/ciCVuyyoZvENyMZDIQClI94iCBXaEvyOvoanGfZxL9drVtPIc5QmRC17XpxAB9uUqoBRN3p9t4y3TRq8dy9n33fTnKr1HFcIRG0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715102749; c=relaxed/simple; bh=bTTBFm34vqlakeJr0m54mbETfTUQX1eA6jXf1Rs5dOA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=DZyHYQ8KR8h1ii7y/8iv3pP9qSxmOty9Qh+/MmUOnJGreBZDygyk5Zqq3kAbjBbtSj1i1qB5Is9504qTVJhFhPzWZGzxkkvl+UXP4j2bfxDiSi2tvDlvuYM96uVV6m+1AOErXqXBfesJSSKyFLBXatLaPTIOg7yrTgWjDA128D4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jNrab5FI; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-41b2119da94so21972415e9.0; Tue, 07 May 2024 10:25:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715102746; x=1715707546; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=hH2gwlX9CIjp5iuBC0nf4yhM48L0bVqOBBwTo5W8RyY=; b=jNrab5FIB2NnWnx4xgeTfTxwuvHlTuY3o63Nq/HzBsUb1b4ZN2+tE5ykrBLzUvNN8N LK8i+RgZpcUoyBx2wKixVkVq4IVh1V4fjaKrHUNyIi1EiP5cdYmXYpeXtnOGwLTYdPhz lJUuClphvrY6vmm0IqLgVV9KfoMA6ICMMB0yLMWiR/pOxJI+EfzQCetg5arxiBsjcC/o 1L/PDBQhGABrFM+bviZJ1R8xuuHD9REtmQrpnOxwkXP8LQL/+V7IqMCxO1mzEx2A8Vx1 sjg0OT+WygO5C3bPzU1YRZsC40QkmIt4fx+lyUkCnfLmZPrtwKhnvEP8ix7DLO2p+0F9 4CSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715102746; x=1715707546; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hH2gwlX9CIjp5iuBC0nf4yhM48L0bVqOBBwTo5W8RyY=; b=xRaRsmAatWXjHYI7G/qsaORGiiz7aoofOsU++QEUuh5qYVr1fHmv4tof9cGvHOd1N/ pjdIAdAiXvQxYkJU50IkRusgdXSZeTynwHpZFxIBo9M6V/yeFyltqmPz1URR+3Ljddx/ jOJS9V2MZDmHncWWRusR9z2eFGYEIN4GVPiCeLpfYUrncsJ3NbA50upA7tZEkPXr5ZpW cb44Ez3dzL9dvhMGobzIohgZukCkRuig5x9JEiXPapv9E0myoDDvlGnG25lAp3rVuEAK 0pY4vtx8VlRrU4H4uvzCQ086EbZTEGtWc+GeW5nFoeGqcAAJSvqYsgnVEq4ahgQp9wGa GxNw== X-Forwarded-Encrypted: i=1; AJvYcCU2H2UqPyoMOPHuTKRTCeIFjZsZ02c7DI1b86RrQ4Su/H/a1QdMXJZFK3dPW34SkDsjxYuuegttAR02O+HM7SoOcZi1e5hzLl9RzV8yDDIbR4A04hK26X26++NtzULgRvPEKCkU6vfJz7csZwFMMTDq0PEbSJvoxF24AADgNm4uBI3f107HKa8tLnm2VnuMdqTrL3KBA+l4k8KPkHuXhysGn1zsuaKpQ4SXNiAUaSK+qKejo9iT0W83w6Kup7ctRFlEOun6yl072/i0i0FPoBVEBJDdtR0Pgd9hDB2SzKO70cirhgH6Am0osm8XPJSnRSTDCOGmDVqE4h5iWRq54saYkL4OIFuW4HnymVytma/mZZw/mMz99DsrhijgISgT9TB5pVqiSOKuea+QYjyZfN29x8OnLYyWHW54axsdxOl9XO87BqLHrpp5qLoB6u0qedyScZFmPtvH9Uz33XnEgHTpLyV+dGcLkMsViEKcJYIqByx8RkPCWRVL0N51izOniOKYIeFlVg== X-Gm-Message-State: AOJu0YxZklsIKNn9nb42QlEnLg4q/dJoYC/3T8qGHBJt/ph0e1Y5awfp Hj9XEsJcvBp2U+yevY7KRBmQjUzYmov6ENqf6QXeNRBf2gzg0UP7 X-Received: by 2002:a05:600c:46ce:b0:41b:e609:bc97 with SMTP id 5b1f17b1804b1-41f71cc1512mr3537475e9.2.1715102746162; Tue, 07 May 2024 10:25:46 -0700 (PDT) Received: from [192.168.42.69] ([85.255.235.91]) by smtp.gmail.com with ESMTPSA id f20-20020a05600c4e9400b0041b5500e438sm20349790wmq.23.2024.05.07.10.25.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 May 2024 10:25:45 -0700 (PDT) Message-ID: <0d5da361-cc7b-46e9-a635-9a7a4c208444@gmail.com> Date: Tue, 7 May 2024 18:25:52 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH net-next v8 02/14] net: page_pool: create hooks for custom page providers To: Jason Gunthorpe , Mina Almasry Cc: 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 , 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 , =?UTF-8?Q?Christian_K=C3=B6nig?= , 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 References: <20240403002053.2376017-1-almasrymina@google.com> <20240403002053.2376017-3-almasrymina@google.com> <20b1c2d9-0b37-414c-b348-89684c0c0998@gmail.com> <20240507161857.GA4718@ziepe.ca> <20240507164838.GG4718@ziepe.ca> Content-Language: en-US From: Pavel Begunkov In-Reply-To: <20240507164838.GG4718@ziepe.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/7/24 17:48, Jason Gunthorpe wrote: > On Tue, May 07, 2024 at 09:42:05AM -0700, Mina Almasry wrote: > >> 1. Align with devmem TCP to use udmabuf for your io_uring memory. I >> think in the past you said it's a uapi you don't link but in the face >> of this pushback you may want to reconsider. > > dmabuf does not force a uapi, you can acquire your pages however you > want and wrap them up in a dmabuf. No uapi at all. > > The point is that dmabuf already provides ops that do basically what > is needed here. We don't need ops calling ops just because dmabuf's > ops are not understsood or not perfect. Fixup dmabuf. Those ops, for example, are used to efficiently return used buffers back to the kernel, which is uapi, I don't see how dmabuf can be fixed up to cover it. > If io_uring wants to take its existing memory pre-registration it can > wrap that in a dmbauf, and somehow pass it to the netstack. Userspace > doesn't need to know a dmabuf is being used in the background. io_uring's pre-registered memory is just pages, but even that is going to be replaced with just a normal user buffer pointer. Regardless, io_uring can wrap pages into a dmabuf, but it's not a direct replacement for the ops, it'd mandate uapi change in a not desirable way. -- Pavel Begunkov