From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.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 746DA38F96 for ; Sat, 27 Apr 2024 02:11:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714183885; cv=none; b=GTeHn+9yp6FUYvo5wx0Fxm0uZZpWnJa90U2Rbpi051zygYrKEM6BW0xjOSyzpK+A7DfiQcHHakyE0ae1MH8vbOgrCOex/iH57Ysni/fkHWUoOMKqAW7xtnovQBRnqI6nkHu4lJWl5TAh/Sln3BNNh+MySwM6HKJ1ZzPS9ITjymw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714183885; 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=dvpFEJh17V7Yqn7wJu2//AI8SS7c/ln1Ao7yoeF69QTSnOkA2DSf/ihFguedLEAWbqJb8wcOH9YBXg+R3HxE7QaWW1YrfP2mHW+3o6fZzn3l8XwMjj+e9Ofh9Ei/imxbR02XFlqWY7rBSmILMKFn8pWqBs+due2K/cj/IV//tFs= 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=HnfjIxXH; arc=none smtp.client-ip=209.85.218.51 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="HnfjIxXH" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a58872c07d8so685141766b.0 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=1714183881; x=1714788681; 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=HnfjIxXHU3VdaAaLMsbwUxjH4TnrOvdMsabm0epAARSI9k7az44E5G9HgFCXktmy1x SEKJzF8ciTrnyp1yLtsVB9ubTniOZuaOViiALr1Q4SUgV8y3TDlfbPnsMaiP8LNcFjjE K+9QWWes8UIp1qi/kTQJHlcnl2IEu/9LejqFzxMfTVsbpuuiCHxCEPzWzm+3eDsriywG 7ODGjTGeX21iwj1lz5jRn1R6UCzC/UuX2SOudXXcnXP4nk8/uS+HJCzblbEm3EmW2b47 Zyy/HPJpqL9dIsWvm1MsLUXkOAnpbCOhrWUr9tcmiOQblH0O3McmojNRY3Vq0kw1R1Di xI2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714183881; x=1714788681; 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=JcpikayLsUQdTIyZAijPxCLFsGiWWn9Mc0xcXyi6prizj8Ndf/GOEmOLaxaBvlRQ/K 7hKC38hZ1E5doqZWaLKAPvVQAYSZhtMIlp9ycYQwehEBLItgehJ69RoYkxyxrM/RkTSS HMwde4dS5+FcEezBVUh9v3shpcRWt6R1fTskdo/iuqiyeEI2JhEVjpLrFHcqmySs35SY 4uTY20lemxSe8V1uC4axd8ppXIjLvEaX69fC9edCd0fUqznQ9IZa332X4TSw2tpHzoEY fOJZcOhmn9XVUJ5WeIbKjxpxzPWgauV7+zQrzUXsi5HEf1vqM+o5egDghPrJzcG0pnon oAmA== X-Forwarded-Encrypted: i=1; AJvYcCUlqORY149BnlzwdRs9dLaiqExvi2ZX3SxrXttXqgaE8EWPAtC4nfLfdbkefXL6e7AuZ3sHpcZtYKGnm7kfnFGB92UdyQmwWB7/cw== X-Gm-Message-State: AOJu0Yx4sjCI2Av1dLegPDLR9/1SRTjUJfx4Nkyq7iNY93xQR9k1CTh3 YNjgxTBFgHba591Zko5hSS/RnJGnfJ4zp2mii3wNC7qCENEVu2JRdN9OFGC1WQ1vEHo2Zs5UX7n hRu3LgLGZg2TkdtINF/+7odRpkZri7la7wJgz X-Google-Smtp-Source: AGHT+IGYpMq0S7NMYmgbheltdqICqswpFYbRt1nWr9f34ViEhM+DD9iOxk080j42Jd8vuPQgs8NIkJRSPoJ58AydrBw= 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-mips@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