Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2034485lqa; Tue, 30 Apr 2024 06:46:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV5ahudNTdn4Ir7Cj1ITnUdtI0caBqJWx0y7V7k1o1UfARgzR4jqCXGtYXhKcZTis7jCMOJ+GxFtL6qNJnyA9m/g+sTWyX4ieLSdh2BKQ== X-Google-Smtp-Source: AGHT+IHMEAz/VJEr9emYqf0vCBtmYZdFyTWrXAPs7vpkP/jdv7kOQMreFVH+gd8sSB8cTZxQKeNz X-Received: by 2002:a05:620a:2188:b0:790:88d6:7982 with SMTP id g8-20020a05620a218800b0079088d67982mr2606350qka.29.1714484785919; Tue, 30 Apr 2024 06:46:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714484785; cv=pass; d=google.com; s=arc-20160816; b=YUo+5vO659lI00bjqwebFQKLOez4kaddSrE8wT/34XWZw55WTExECyIBg0SU5EnzJ1 YUkpaf9xF3zKAVlF2Kr3GuH/CjmQ051FybeLBQmQa06cU7TVHDJY/4CgPMkAatCUwSua XphOG6Et6p6/9LJMmWgOoqxBGdfth8riQoG1NMrlVkiQR0hWuCoeOWeffkJRGmTk+xQb wO1w5Aw+6kuLwy9UhFJOAwesWEIHBtgXFHh2LvFEeaBnAneXWo7zTp+FofImTBq7sTIb +PGgzAsc7Qz7IecMmDtn9gh1iTTOVQNO9Yy89rLqfkvrOXyIi3oXFtACAfsSz/cW7R5a zqcw== 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=JjNR4wPlgvb/NrdAvCR/ceifiIGObytGntMYaBKjRCU=; fh=14Hvf+qCSvswoh640XTfTIWra6VFbiutXH/qx8fxSzA=; b=clvrpl16k1oIxBCniCDxOJvD1ku3x2Q7sKrs4uEBtl3kPiLExCfGShKW6VGicoda/0 J4vP0BN/egPgPtYop/t77seaQQS1O2kdildxoyL/igyGOifMgeY5xqLoecZ3TZ+rxkYd 2+DX5KbDfwUCYF9YHean9L6pZzPqeEmqXUgDZ2TcXSn+cbCXpG8bZsxUPSZPOKQ4epKS x85u+lFnwz3nL3VCSsFpkPtLCS/bMTKZGvHw8VCyGGo+6cvyd/c76czKL4c/FmeQNE9Q 4LrEaYhDEsWJufLCinf5vBRG0IUwVVBfRmdO8wsPKPOLIEDctonQin54P9K5p9cp+cub AKDw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=TrbWzzUJ; arc=pass (i=1 spf=pass spfdomain=kernel.dk dkim=pass dkdomain=kernel-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-164037-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164037-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d16-20020a05620a137000b00790702b5541si21022271qkl.190.2024.04.30.06.46.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 06:46:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164037-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=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=TrbWzzUJ; arc=pass (i=1 spf=pass spfdomain=kernel.dk dkim=pass dkdomain=kernel-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-164037-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164037-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 92E6A1C21B05 for ; Tue, 30 Apr 2024 13:46:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 99EDD171E6E; Tue, 30 Apr 2024 13:46:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b="TrbWzzUJ" Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (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 DE028171E75 for ; Tue, 30 Apr 2024 13:46:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714484765; cv=none; b=hp8tbvbzfevvw3dL35UYMARpnYH9zvl1o4ya74qqYwH1vgq2r7ByQCfY/EinsXfFYzLLipL9cxbh5ZBOPkeC+4G6dXYqN9lXbOi8C/WodhVfLw/a2/cBY7BB+gNH7hIu0BjpKPyd6Iks5elkCIs4Ueho5HoU2dgPW993G8cOTTg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714484765; c=relaxed/simple; bh=T1pCeAqcp0hagoseX+NBrv4VuqjeZqvX4PDGNfjpbho=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MBTPMMrCqWx5jMnvh0PffBuPLFelFS0vVjgLI1S3ekmo/wu3ovcYpzMTj+Z3LUgpzzKjxp9Fs5cZLd/0hWckHrMEHZIM1fEVBxUXUYsx/fjd5xqhqqQ4z/6+0TWskcuI6PK3PqNitCIC7LXcgJX4EBMQLeNTMsTK/dLC8n68gjc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b=TrbWzzUJ; arc=none smtp.client-ip=209.85.216.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-2af37c18c10so1380231a91.2 for ; Tue, 30 Apr 2024 06:46:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1714484761; x=1715089561; 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=JjNR4wPlgvb/NrdAvCR/ceifiIGObytGntMYaBKjRCU=; b=TrbWzzUJm4ACtdJyO8oibE6KYZmSqfTX2Jp4Q0yG9JcxctyXvP+CDWGCRkRrVsuMY5 iMVNVsN3muXq+fKDdYw5GJRGGzLAyrSmaV0eEKQRnVARtWliWdQoTqQ1FD1RUlHU5m3U gDdLu5C5HjkqWAIpLZ4ayF0asn66ueCZTz0j8eCPMTI0Z8v/bSHAT2v+b0W4MSZMvrlE oROpvzBoqEz7hAfm06s0TLcuLfyELeqxigNRtGhSdBSBaHmYeXwgI8qUnuKDsSwX9Nh2 5g8SyL48LiJV6qg+w5MFs+9pri8thZKS40PTXmP8hzxdCZM8eyX9NKg32HgQ9RPA9Rcw IC2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714484761; x=1715089561; 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=JjNR4wPlgvb/NrdAvCR/ceifiIGObytGntMYaBKjRCU=; b=lth4h0DXaCZSE9CCs3DoRLsLBKFvw6gk4QBTqmi+LVKvhAJAwco8gxuheX5/REv0mH ITIkiR2B5QB30jVs6f7eWrAlvKoRdZ+i2N2y3iCKqlXIaN4tBQQ106V5PqJ+0NQG0yZN GpbDabyQDzi5jJvOvk5/WonOO+2zU7RTCXwZbH0f4WfeQZIwJI7KABLU1hzWzH3TQFDo ssp3xgAtg/JkKDmGvV4Ww44hrmjLvvEOlETiiTkmhhwud7W66HJR3QuHzZNqlx2aIO46 1StYacQa/I6ws34a56L5ORoEaGZw8PpUFYtK9N29V1k0BhMsZdjE3noFSsVlm17rd2FK 3JIw== X-Forwarded-Encrypted: i=1; AJvYcCX/3ww3umYIdg+pJg5JEbuwKXu+dUYLeDAhNbNWJNjRHUi+b2fqdeDjWSyhKvZxw3qXuP9JlL5+acjwGo3SgBXttUowTib6xl+GigzD X-Gm-Message-State: AOJu0YzW4EyNJzEqKuHWMh0JD2CTfvIYn3VZzecxQl516SrqnkenfyMt 1O3IBUxiv4bAW1OfOFlxvgyjqzoU2sPbhHNXwCvd27R6ehQolE5p+Wo4DQNAZcY= X-Received: by 2002:a05:6a00:1d22:b0:6ed:cc50:36cd with SMTP id a34-20020a056a001d2200b006edcc5036cdmr14955130pfx.2.1714484761068; Tue, 30 Apr 2024 06:46:01 -0700 (PDT) Received: from [192.168.1.150] ([198.8.77.194]) by smtp.gmail.com with ESMTPSA id fe8-20020a056a002f0800b006ed00ea504asm21108186pfb.159.2024.04.30.06.45.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Apr 2024 06:46:00 -0700 (PDT) Message-ID: Date: Tue, 30 Apr 2024 07:45:52 -0600 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 To: Mina Almasry , 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 , 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> Content-Language: en-US From: Jens Axboe In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 4/26/24 8:11 PM, Mina Almasry wrote: > On Fri, Apr 26, 2024 at 5:18?PM 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. In general, attempting to hide overhead behind config options is always a losing proposition. It merely serves to say "look, if these things aren't enabled, the overhead isn't there", while distros blindly enable pretty much everything and then you're back where you started. -- Jens Axboe