Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp161681lqa; Fri, 26 Apr 2024 19:11:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUrySVsBdwQtGHpAZFcjNlbHk3ra1U3jNMDrLUFavk8a+ix6S90tXbCz7nQnNQdJZj/CWS/8isGirVuPBu7w4WQpFGZcx9mi1wGeO/C2A== X-Google-Smtp-Source: AGHT+IER+8Dx83BSx81XtvPfzewI11e2GphrfawowQUIdL0PyeR40sIPW5EmSLMtml4buVpRDHgx X-Received: by 2002:a37:c20c:0:b0:78d:643b:e977 with SMTP id i12-20020a37c20c000000b0078d643be977mr4818210qkm.19.1714183901010; Fri, 26 Apr 2024 19:11:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714183900; cv=pass; d=google.com; s=arc-20160816; b=laKdVPFIzS+2Bj346n9JiNPorFIrmv3lCfJjZ753viXt4/FWZHnkjLqEa4OTHvaoYI fasaEKC0rBgn/YnmB25DHxKzLjdhUymWhnLs5u+k8YaeyBDcIO741mKO3zYe3DNI73Cw iXpS6IGr8iXAsU+9b3hCZs39yOAdKLLFz2CghrleKHVZueCWzjM9rCoWkB1RevK9+ZUy C0WkDnayAHwHGx/cqIYfahHnnLuyJAuQar5gKgxuxvmUOMun0/7JoL4mK2cqftb8TbBA x5d73eX6v0kUEKj60SllpEk6ntkKOEmurLO5JVjWUJDNSiO1GvWuErHYYwdfIa0cJqDA 4cFA== 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=VCqXmA+0tJPmuPol3Ypy0jPmfZ3hkXnnk0DE4uLAUwU=; fh=PbAIrO0/Lkmh70LSVp6FGks8srTUJ+Z/fqfUCNdyqQs=; b=u2jzaM4pQa/mkcAZ+C2wpq0OA5qfJ3uH5kVYGFAKVLbxpVjWt0hL1GDM+i3JnQXQ4H JUv9TwD65pIZhyMliofMgD1YoWxxKqs18Kbbci+1j1eBRYovCIcBCLePxxIpnz1a0Sek 4fdV81ozkNALRskz0Wa+BlSOwAIvGb2JP3PQ69EK40pSRslCOSUbvAI0PXrz5xV1tHbq dTg4LXsvKQLhz9pXlNXDgKxgH9xal+a4YR1UmooiRY/JP2XSA4xgf2C9lAKob5+fGnO9 RUMFWHvJr3DUfSYGcNO1Aaw1Mc3PKyDhvKhcKjfZ9vrCzIygszDBUausxBCfiTi3izmZ mOcA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=mRu4S3Xu; 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-160868-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160868-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id dt55-20020a05620a47b700b00790634306e0si16912370qkb.562.2024.04.26.19.11.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 19:11:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160868-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=mRu4S3Xu; 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-160868-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160868-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id AAA661C21DFD for ; Sat, 27 Apr 2024 02:11:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F07F438DD3; Sat, 27 Apr 2024 02:11:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="mRu4S3Xu" Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (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 45D7D38DE0 for ; Sat, 27 Apr 2024 02:11:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714183884; cv=none; b=IFG9a7xt+QYs9wqpDvNtcSRxF1MyJw6yEsXUC3eiqqlai+SCGqupoLf31MKJG3T+WEfKS3gOXW15H+cXNlx/5cXTThRUYjoQ9CvIel0C76W8Nex6LHoXdmNYqyMnBQCMjmVHHVCLNkRuQ1npE9fNH3iL93O/BlBj/axzQGRikfU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714183884; c=relaxed/simple; bh=3TH1qKN/8kDOE9KfhYRZV82BLgZZskB3YkO2+4vu+tY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=IZ9bqei0vK5F2oVp0uuwVYD83uBKqnkDqWJYvUpfaH6JbPAjTN1XC9Mwirkukyquz7wWUrUXUmDN9iq22m7exsRB3M7sAj1Rvt6WDjr+GuOugiHYUrtY5dlEY56RPXlrVhHx3bqmTbdLYNpstX8Pkaf4Nw0oMcbn0i9wUMDyJFo= 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=mRu4S3Xu; arc=none smtp.client-ip=209.85.218.54 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-f54.google.com with SMTP id a640c23a62f3a-a58e2740cd7so59043466b.1 for ; Fri, 26 Apr 2024 19:11:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1714183880; x=1714788680; 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=VCqXmA+0tJPmuPol3Ypy0jPmfZ3hkXnnk0DE4uLAUwU=; b=mRu4S3XuUIqgZ4Zuu0XgismEQ5/XUBilPfFw+Xm1y6jIuBkNYDGqtJpVPfr3+pUbZf sAyOLb5LdfBvQbmhLVih+PhEODGod32DbRItT4xo6P4xZydC8tce2YXd8+WGUheKnvMl 0gsDcMKy6EBMpWyVbsMo1ZYgFLSjchUULUluFbRjoQMZtHnCgGtdyMdP/eTFH75BbT8K FVX5+bOMpdzkiS5xZzDrCWaSldC5RZPNVAUarByQRaAUL3UsGpPK9BwIUf856PWynKMz yJGJKrx4/S1+RH9spj8VX4cHz3UyMAPh/HkI2nBx0BpnQc3OmMiXbW/kS0kmdQqOktCD Fhzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714183880; x=1714788680; 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=VCqXmA+0tJPmuPol3Ypy0jPmfZ3hkXnnk0DE4uLAUwU=; b=ctqYi6Pw64sZ6hqAt/2hhWv3jfcXWSvm/PJelDl2IvcBJqQJhxHqGIn4Vf7ojjEYa9 nzL/ADgPm2iAvg5VRKm7hCI90JKIF1u48ieTQBCYOqhIZbYauwmzBsZeW2irHOSMpMx9 4U1i/e52Il6fmuW3m65VQitrfk8lLyxVzceBIagEoqgrSjzNx6l3p8OmxokoLIqIOTnF o67TbL7kI1r2sgYRAYAZhq9mKs/QutqOuhxUJvkY58qAG5FltTW5RI9pBtjWfbImd5MZ yoMmVu/Fw6dDOayZS3S0IWZOjLGy7X1+eeHF4pH6NKMnEhAOPuK9lfF0AyrU0yG8J5mM KBVA== X-Forwarded-Encrypted: i=1; AJvYcCV3mlz2ON9WyrnSxVT6GNGpKFRHQi1MrbX033gMgvpbKoyB1HseDnnrhKVoJ0kIajQ2qfrD0ZMkz088jDAVWuVyeMGHQM2mkDHaIJH7 X-Gm-Message-State: AOJu0YwnqevvRKGQ4DO32NiA2XVgYZFrcGX88YTPkwz2QMM23MuZUjV9 hb5Hk08ipugK8OzgAXd9e7gkfJxShx9sIE5M/N9SCVJ5PHBDhTxRFeXTACrQhHTA/6Mwaj4itMI cG4zJFvOzbgk6quvDo19Ewj4/TWBISN2QDETKh3fJNAaMgVGXpF0lX/I= X-Received: by 2002:a17:907:a49:b0:a58:c550:a102 with SMTP id be9-20020a1709070a4900b00a58c550a102mr4510853ejc.29.1714183880204; Fri, 26 Apr 2024 19:11:20 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240403002053.2376017-1-almasrymina@google.com> <20240403002053.2376017-8-almasrymina@google.com> <8357256a-f0e9-4640-8fec-23341fc607db@davidwei.uk> In-Reply-To: <8357256a-f0e9-4640-8fec-23341fc607db@davidwei.uk> From: Mina Almasry Date: Fri, 26 Apr 2024 19:11:07 -0700 Message-ID: Subject: Re: [RFC PATCH net-next v8 07/14] page_pool: devmem support To: David Wei Cc: 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Apr 26, 2024 at 5:18=E2=80=AFPM 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 :( My apologies, I'll try to put the changelog somewhere prominent, or notify you when I do something that I think breaks you. Yes, this is a by-product of a discussion with regards to the page_pool benchmark regressions due to adding devmem. There is some background on why this was added and the impact on the bench_page_pool_simple tests in the cover letter. For you, I imagine you want to change this to something like: #if defined(CONFIG_PAGE_POOL) #if defined(CONFIG_DMA_SHARED_BUFFER) || defined(CONFIG_IOURING) or something like that, right? Not sure if this is something I should do here or if something more appropriate to be in the patches you apply on top. I additionally think you may also need to run the page_pool_benchmark_simple tests like I do in the cover letter to see if you're affecting those. -- Thanks, Mina