Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp86243lqp; Sun, 9 Jun 2024 18:12:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXWlsZj/epEDX/HpD4MaMxhAPh1dH9mZD+tRb6shPXgHN63Nx7v3MsXK1uzart5Zfan3WZaWEycr3QeXV0HABj/yC8ic01HHEISFd2K/w== X-Google-Smtp-Source: AGHT+IH3eh3enbhBr/YlK/64R3AFlsyjm80r4p+rRyl/a11YRAC2fN3xc9otoIuyg++Isgh9hBBO X-Received: by 2002:a17:90a:fb93:b0:2c2:d8d8:7632 with SMTP id 98e67ed59e1d1-2c2d8d876c5mr4105273a91.38.1717981970835; Sun, 09 Jun 2024 18:12:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717981970; cv=pass; d=google.com; s=arc-20160816; b=WmpD0wlsFV4WFTFkyBbXHfSsclItK0cjrPHMgM2eLCLK2IUQ5q8UKKm7H5Sk55s8dH YJnPNR0Mmf/aWzblWIQXZ+q2UdQa0lyj8k2xz/wp+WdWO7JH+uQDsmReVC3SwmxfVHV2 hTxhezdqQtUSvzwA/OgkEwLZG/dQLNlE6AudhJomAfrEIxZH2Fc8r9bGaVUVXteonOo5 Fz7kdlPewqcviLN2Ngu1LVkuAAJaTevCzCvUrgFe6ilLXjNHGhotcDBeqg9dUMBxanMc rhAKMOqFskRL0KuQTazbaKcaKJd6hYkMOH55PUxjJCsAnCf8X+t0gIml9M16bKerc0y3 sq4A== 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=lNJduADeWsFPxp+m1I5nZ3f95BR1hPfUvUg61woS5Tg=; fh=NfNnSzJQ1zE5R88poo6T4fIReb8V4E+8L7MdL0lbsXo=; b=wCkg7luHS4GJtWR9kFITUYwQPKb7Zg7OMJCsiMcGXgiO/GYT9eeXf0odHX3aYCd/vy 4fAoEzjAJ8n5qytS/e+syF1m/QI6XB/sKRlK4aV5NOXiIW7JEyq6GdfbYlyy4h7Aojun Iy/s6xwsK+gQrpjU66c4aoAIyhv8eDXU/TwySHdhrxRDOtBcZ0nygqEkoRFRWQvzhmOb 7K9r7JrWtS4S5mJLE7+av2pYFhb9F9UvDpY1mySYcPkf7JnsAU9+szlcF3u25t291mu5 BX+xuoChxeB9smHT9nAgAy7X/35JUGwmiU6fb4smZAsoS59dIamfNAEjXGu/67OLad07 OBvw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HxTfbDoC; 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-207584-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207584-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c2d1133c0asi2938504a91.141.2024.06.09.18.12.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 18:12:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207584-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HxTfbDoC; 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-207584-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207584-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 669B9282029 for ; Mon, 10 Jun 2024 01:12:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 25FCC79D2; Mon, 10 Jun 2024 01:12:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HxTfbDoC" Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 62E5015CE; Mon, 10 Jun 2024 01:12:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717981950; cv=none; b=dW874Or8EP5ScmdTYNK//bXcpk0a1JHlmELoOpgxcE5zSihOuXrdzze6C9F97hHipe1GMzdhxdY8VBkDzsznp8NdOiMwX1wAg56hCHw1ku2eEtR5jLx8DCT3H+SuBrp4sL89GjNC4quG5V/iv0ryV9YiJoVU8ebYuqvIlyx5a98= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717981950; c=relaxed/simple; bh=EsX5TKziqgKhjkWYw5NLeEdQUsicnvMiY7lDy1rAcv8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KS53eTtVtLLHIc+NH+9WjqwavPBq1JH26jNYDr4VKjrV/8+6bh9uik+h4vdM0Z5o5nKzjGgOVQGVkBJk8TUwuDwQy0Q0PfXC+qjWEDw3WLmxa9fJuB32Oe7TVB0Uaq2hejnz7wK/zvOOLbcOXr39D7ew/re3I/P+oKmhxiBAB2I= 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=HxTfbDoC; arc=none smtp.client-ip=209.85.128.51 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-f51.google.com with SMTP id 5b1f17b1804b1-4218180a122so4707665e9.1; Sun, 09 Jun 2024 18:12:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717981947; x=1718586747; 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=lNJduADeWsFPxp+m1I5nZ3f95BR1hPfUvUg61woS5Tg=; b=HxTfbDoC89Qf0MsImNbmIKWJTh32SI6iwMqfT9O/prOG0vt11PFGr7UpiXnFmvZ4vy Wc47ZP6Uzy4rk3CxWfdcBz6qrXfLrzeFlRRw5ostrVsVMqO+q62hVC1pRKraekq1WoKQ LnMl0MFZ3z5qkS9V6GGpXRnAQU7pjQZI7tYa/NtlHApZZDneKwbUdOrOrkuw9PKk+IVD 3aDYridbIjvo0Ts9nBInmFZpE0e5egbWK2Y0xDa4cxmNh8yi4BzMSINR5QdgAybdmglD S+NEIVK//kO1QdQv80fQqoJkXkhtjudMX9NngNDzJcYAD77vVny1VyLK2c/zv4dgTosH CvIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717981947; x=1718586747; 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=lNJduADeWsFPxp+m1I5nZ3f95BR1hPfUvUg61woS5Tg=; b=efXW7TGUbjzhTPjWaR3M9JNJ0TT3hgr52fwW/08d1zSl2DJVHKIK1ywXDJxFP8jUCN uXoRYY2NQSfdmNBD01VXcvn91lh3Gdcj1bmXmAJGssewVLk4uU1++8i46KUHPYU1E8n4 +CAZNxNElM41PIhqeqWnXjew7TpUURKPkdd4YJJpDo746OeOvb6GVs6LKgrjbHcrrzGB FtySB9tx+pyxrvxCw7olwdkkURLL2b7Q5EjJjg03MDhC8LnwCb72fA2/mcQLUARsKeV0 se95wMBEIfASmdqiEZjY7F+BRSlYNM7xdD8UMNoNXcgJXZOjef14KP6ehd7LX+o6MgWw sZqQ== X-Forwarded-Encrypted: i=1; AJvYcCWfJIJOllN6tFckACsP6Lf/NQTIgbkmtqGKN/oJaX8Tpyu/yZghmDPq8EIRo96HHTtzmeiavEzs9xye/Eea3iluOv57I22neaWt/E7WpKyGF+En0q/Vh0Fzix/D9TKXOLbrA3E/szeDgIBGA/ZkNOiWYWw+AE4QSS/r+4emUzHt6FPQEK5vSDtnRaWnLTKscsHHNP+qyJPRYTMJoyq8X1VCzpeuSEEiSInwcomynMT9xikjgErSvKm6DGmU9Az2J6VyqsoOTHhF9++mYtlA/KxqkyUEK/KA4DrBEi0aPWrGkKsdj0xgi3QMYt+BuTVkLgjHzPDlYdxmszrJ0PVeVweBhn0fF/PRYOeRgcBdq4mEbEDBZ9X5jBMn6aecPDKJmR/yue9ZUmyzAMZ6cSCXaaFpaFBeXJCbjQME/yIS5O2QcMLOKHoFuph4aPax1JHOUGMDxpKHBl5ur94KaBU6pMXwAdXpBdpXl/Waz+BipEKdgrQ+xrM8xGYkPYXar2pHEBBujS3VQw== X-Gm-Message-State: AOJu0YwZs1yFSBL0veNDh42YRYeXG3l6nIedPtaf7vYjzimRwG+f9HBz QwCCNJRyQ1P5tVA6tda3rDvVJVi8pM0270M0RgrHyEo7NKPqZ67X X-Received: by 2002:a05:600c:5113:b0:421:f346:6b06 with SMTP id 5b1f17b1804b1-421f3466f07mr3105805e9.28.1717981946528; Sun, 09 Jun 2024 18:12:26 -0700 (PDT) Received: from [192.168.42.136] ([148.252.129.53]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4215814f141sm158668365e9.42.2024.06.09.18.12.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 09 Jun 2024 18:12:26 -0700 (PDT) Message-ID: <5cc208d6-6116-4e9d-a48e-67290adc573a@gmail.com> Date: Mon, 10 Jun 2024 02:12:24 +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: [PATCH net-next v10 02/14] net: page_pool: create hooks for custom page providers To: Mina Almasry Cc: David Ahern , 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?= , David Wei , Jason Gunthorpe , Yunsheng Lin , Shailend Chand , Harshitha Ramamurthy , Shakeel Butt , Jeroen de Borst , Praveen Kaligineedi References: <20240530201616.1316526-1-almasrymina@google.com> <20240530201616.1316526-3-almasrymina@google.com> <5aee4bba-ca65-443c-bd78-e5599b814a13@gmail.com> <8f44ca2a-8910-418f-b4a6-ca1e051484ba@gmail.com> Content-Language: en-US From: Pavel Begunkov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 6/7/24 17:59, Mina Almasry wrote: > On Fri, Jun 7, 2024 at 8:47 AM Pavel Begunkov wrote: >> >> On 6/7/24 16:42, Pavel Begunkov wrote: >>> On 6/7/24 15:27, David Ahern wrote: >>>> On 6/7/24 7:42 AM, Pavel Begunkov wrote: >>>>> I haven't seen any arguments against from the (net) maintainers so >>>>> far. Nor I see any objection against callbacks from them (considering >>>>> that either option adds an if). >>>> >>>> I have said before I do not understand why the dmabuf paradigm is not >>>> sufficient for both device memory and host memory. A less than ideal >>>> control path to put hostmem in a dmabuf wrapper vs extra checks and >>>> changes in the datapath. The former should always be preferred. >>> >>> If we're talking about types of memory specifically, I'm not strictly >>> against wrapping into dmabuf in kernel, but that just doesn't give >>> anything. >> >> And the reason I don't have too strong of an opinion on that is >> mainly because it's just setup/cleanup path. >> > > I agree wrapping io uring in dmabuf seems to be an unnecessary detour. > I never understood the need or upside to do that, but it could be a > lack of understanding on my part. > > However, the concern that David brings up may materialize. I've had to > spend a lot of time minimizing or justifying checks to the code with > page pool benchmarks that detect even 1 cycle regressions. You may be > asked to run the same benchmarks and minimize similar overhead. > > The benchmark in question is Jesper's bench_page_pool_simple. I've > forked it and applied it on top of net-next here: > https://github.com/mina/linux/commit/927596f87ab5791a8a6ba8597ba2189747396e54 > > As io_uring ZC comes close to merging, I suspect it would be good to > run this to understand the regression in the fast path, if any. If > there are no to little regressions, I have no concerns over io uring > memory not being wrapped in dmabufs, and David may agree as well. That's the easiest part as io_uring only reusing call points you added for devmem and thus doesn't add anything new on top to hot paths. -- Pavel Begunkov