Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1282971lqh; Mon, 6 May 2024 02:57:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCULa7yXOjMvgx6OEHvBcYVNwPIT2T1eRHVOXb6r6HyXcp1S1qQJMkqXQvolx67ZhfKF/xNsiH/x3XT4cHsIjfX5X8m+rQfWBn0GW7w2cA== X-Google-Smtp-Source: AGHT+IEshbEbMvFqx28QcFdPf9cJ/XqskHCUO5KQT1M81NS05Tv5Vx5pHgMNXnE29RQvquM/baPH X-Received: by 2002:a17:907:9691:b0:a59:c3d0:550c with SMTP id hd17-20020a170907969100b00a59c3d0550cmr2725615ejc.43.1714989465108; Mon, 06 May 2024 02:57:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714989465; cv=pass; d=google.com; s=arc-20160816; b=XsNmQgNI+uo5kDxcSDT7bLkf8EQrpBUbhzR5lkMU1yRBQGRohBeYxJ3lFkZj9rvNpr 7o2SsFfjvjDr8XzfKgog2vG/JSdv/NbhE+1+AgBfEE4fvUNV19K8bCZNOECieKLlqZRq R+AbqsRlRMCXSHv+eVPtgqBxta+PzjSRlGklOl4vsoPuCPF5Ic0i1pyWIIxnHvEj9y99 r0U8XBBDfjTgSLQ2y5XBGJ/Dg9k+NWO71VWhATL378OkX9Cr0oZniRl6PYFKx7aaMAgA 8oYf/BDTf9iESJEZqCROUfZIdEcqFghWwaLiBeuSWRrLUGUl95Xa/djdPfXzRg872QSj b0rw== 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:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=sTixdwfAlIVssw/yTwe1uZ1trqj6K9Ho7zGTIsCsG3k=; fh=RKdRJ/uFGykUZJVgpvCqFqOYUEk/xyNYAr1QxykpDHs=; b=TS/ytePxFdV8cfV0LtUeqDFWzHbCAY6JdPKVsRkD17r86IoRGA66J6Xz9FMVknqPk+ XzgdiJ5xmdiqpQp7QQCqjB6vSt7z4uzXLgWZjUJYZh+hlsDuVNvb7WVX2Pb5bBgtB09t +oP8VLn3IxuCw9au0/7iLJIdo30DEhN/g8AosTrrqNIRkDt8/0FUHZSNFEGjpC1c0x3h Kox1M0qJeQMrH0Zf2siwR3L/likHnF34e+ip5HgGGP+rOZzlZk/gny4upqN95v81iSt0 SSeecvGJH953m/ZN2W1ExvZM84R+5CqP8nY2gY2wXkOZqEedtQSufIqSXK2qDKzBbWMD XxwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@davidwei-uk.20230601.gappssmtp.com header.s=20230601 header.b=YJtQ3EPk; arc=pass (i=1 dkim=pass dkdomain=davidwei-uk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-169209-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169209-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id s6-20020a170906284600b00a5947ccf606si3329303ejc.66.2024.05.06.02.57.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 02:57:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169209-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=@davidwei-uk.20230601.gappssmtp.com header.s=20230601 header.b=YJtQ3EPk; arc=pass (i=1 dkim=pass dkdomain=davidwei-uk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-169209-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169209-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 1CBCA1F21D4E for ; Mon, 6 May 2024 00:29:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 93A203D7A; Mon, 6 May 2024 00:29:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=davidwei-uk.20230601.gappssmtp.com header.i=@davidwei-uk.20230601.gappssmtp.com header.b="YJtQ3EPk" Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) (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 2914B1C3D for ; Mon, 6 May 2024 00:29:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714955363; cv=none; b=tvla7nbyKva059jdDfBlK2poE4By6tRTIReyuh0rtE3oRtXZp6oytMoNWnvFkpPWYESzT1OF/k1A0s4ymFi+cYX7GXxug6aMCUufv+Vnm5CXr9F1bkAD45v2gzG1M4diqn6a2a5C0m6RPjXggTCZd3sSA5Q9+sAfaBlDChJ/s4M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714955363; c=relaxed/simple; bh=7p83fI6SjhbSz9whdN8AjeYm5Iaq6UXmW/wjThWyv6k=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=AAWjX8293zTbaAmEyft0kizg66fM9t2PYfgBojhot8AeYJu5rnPMVdXiJ25kOIMOc9lnV/Y2Kj9J+A/w4kUc/db6GW5oO+X0b+hzEU/LUbFku2KuhsqLo1Ht6YWtz1pUXhNFPzU7I8EfvZMqTByqdzeIUDu/7LYKQhq6vY/hofI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=davidwei.uk; spf=none smtp.mailfrom=davidwei.uk; dkim=pass (2048-bit key) header.d=davidwei-uk.20230601.gappssmtp.com header.i=@davidwei-uk.20230601.gappssmtp.com header.b=YJtQ3EPk; arc=none smtp.client-ip=209.85.215.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=davidwei.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=davidwei.uk Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-5f80aa2d4a3so893857a12.0 for ; Sun, 05 May 2024 17:29:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=davidwei-uk.20230601.gappssmtp.com; s=20230601; t=1714955361; x=1715560161; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=sTixdwfAlIVssw/yTwe1uZ1trqj6K9Ho7zGTIsCsG3k=; b=YJtQ3EPk7IxrNvgo8weclRLgIUIWkSOI2Uep1o1M/rk9e0dB+mVfcDL2Ra/RKgbRaV 4yD0nNAz17zHnC1JbqzasjATt3Y4kUqFfBfl4uDx/zyyAwmCgdWBqfnXG64JOZ3VVasD TpWrwpoJPMZ1aCGn4xBszZrjTzvv5gHLPW4FLW7M2xKyeRN3dmeqwv7P7Qzj6PulULEp iKKq9LW6PdJR11ebmc1NoRMdfQ6vYQYYHA7xQiZMqlhAGok5r3mf8gMd5KZKadxtoFqx EMNG1nXwcBwffehAbXoAJ9b4BN0JZNUl2iEcpz1iMRyOz+EEFNblqZD7QukB/0M0HXcx nJhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714955361; x=1715560161; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sTixdwfAlIVssw/yTwe1uZ1trqj6K9Ho7zGTIsCsG3k=; b=AX7KNWYQIaBuqDH1rMQJXXY3rcieLW96wbqK6co1XyIrvmkpghU1yuRILn022bpgAd GuUjWqI4eeYaQH6nzbGW39qLyszCJoo75Te4VV0z4KnAs/jMRoelPqPe7IyYsfP2GMQ3 EHkxBSBLORvTmlr85GU7gEyvQHquTgSCFyBIbojdp6mVkkLnd8pFJGzeARvCstvpiq0n Y3x9TXDO1kQPW3lmlSsPA+piMyDQ/nUDiZZtS1Lng32aEf6dDs7J7g9wA2TaP7KrHSNV ptfbA4VYzxd7WAh6zGf0gJpez0/4Hn86b0u4lcniqIFQChlmo8lPR1KDS2VuAH0w6lWR OIvQ== X-Forwarded-Encrypted: i=1; AJvYcCWOk358tW6DgHk/uWP3/TyqSrd+Zt8jOGF+IBN08jNM+YYMcnIRaXspLwAkLndNb8UEoa0iqOUQqnUAMUVQqraqjTfIvCYIWWuLfxkW X-Gm-Message-State: AOJu0Yztnbbe/Ma8UIim/zo2GrkaYwTJJGSF5B+eQ5m13YvUe+lEX27K fTheY0j5EkBP3fyKk/Vqas4zCxziLABme9CtR6Dg4KY9LRwpBB5XxhcV5cPm+eg= X-Received: by 2002:a17:90a:d30a:b0:2aa:c2ba:3758 with SMTP id p10-20020a17090ad30a00b002aac2ba3758mr8212757pju.42.1714955361360; Sun, 05 May 2024 17:29:21 -0700 (PDT) Received: from [192.168.1.15] (174-21-160-85.tukw.qwest.net. [174.21.160.85]) by smtp.gmail.com with ESMTPSA id h4-20020a17090a710400b002b1314ba8c0sm8708252pjk.57.2024.05.05.17.29.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 May 2024 17:29:20 -0700 (PDT) Message-ID: <306cf793-6f96-4a22-aca0-53c0ccefc0a1@davidwei.uk> Date: Sun, 5 May 2024 17:29:18 -0700 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 07/14] page_pool: devmem support Content-Language: en-GB To: Christoph Hellwig Cc: 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 , =?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 , Pavel Begunkov , Jason Gunthorpe , Shailend Chand , Harshitha Ramamurthy , Shakeel Butt , Jeroen de Borst , Praveen Kaligineedi , linux-mm@kvack.org, Matthew Wilcox References: <20240403002053.2376017-1-almasrymina@google.com> <20240403002053.2376017-8-almasrymina@google.com> <8357256a-f0e9-4640-8fec-23341fc607db@davidwei.uk> From: David Wei In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2024-05-01 00:55, Christoph Hellwig wrote: > On Fri, Apr 26, 2024 at 05:17:52PM -0700, David Wei wrote: >> On 2024-04-02 5:20 pm, Mina Almasry wrote: >>> @@ -69,20 +106,26 @@ net_iov_binding(const struct net_iov *niov) >>> */ >>> typedef unsigned long __bitwise netmem_ref; >>> >>> +static inline bool netmem_is_net_iov(const netmem_ref netmem) >>> +{ >>> +#if defined(CONFIG_PAGE_POOL) && defined(CONFIG_DMA_SHARED_BUFFER) >> >> I am guessing you added this to try and speed up the fast path? It's >> overly restrictive for us since we do not need dmabuf necessarily. I >> spent a bit too much time wondering why things aren't working only to >> find this :( > > So what else do you need? I was assured last round that nothing but > dmabuf and potentially the huge page case (that really just is the page > provider) would get added. I'm using userspace memory so having this gated behind CONFIG_DMA_SHARED_BUFFER doesn't make sense for us. > >> > ---end quoted text---