Received: by 2002:a89:28c:0:b0:1ef:fe5e:92fe with SMTP id j12csp39916lqh; Sun, 17 Mar 2024 20:20:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUKfNioEkX67024MjKof/2UxHfejWoia74hug6qRXfWeBePb1HRFL/n4i6qSCMasSsTb9sYg/ayzVZ/e5qg302xHtfprMBbor7oqBh/TA== X-Google-Smtp-Source: AGHT+IGh/xrJbJhM7+lY73onHu1QH93JrD5gCTXOnXosFQ7aEOH9LMIqxHrGb24gjOgrkebu+bCd X-Received: by 2002:a05:6808:1283:b0:3c3:899f:a88e with SMTP id a3-20020a056808128300b003c3899fa88emr1408324oiw.32.1710732001519; Sun, 17 Mar 2024 20:20:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710732001; cv=pass; d=google.com; s=arc-20160816; b=AZf70HBgVy4wwHOq3cwTaMsPU32B4KXHKQzxJOumYmeZUaqCm7OrkKcb40UnGoq2GV xreWf2JV7riXzeTqmfW4JZ8uF0a+tFp3vBpRhKprZWzkl4bG13uruw0f956RxmD/RVow LYi1xlYiEXuWjFqnmO2lk1YoVVDUVfk2ggLyb3YxYHC/+fDUfmIfojzbp/MKaUVyvEGM G6l7Sp0OuLTVPIetez0KwkET24ar/dnBZ4vXXT18PsqKvFHezAlMir0Si8Z1HOeGCCu4 v0T466kPD0ePjG994WZ+sVvqH9KSnv3nVqtROKBnT8Nq6aJfALzuJjIbZDQ0QDucfh3d PcGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nzZSUZc1IlLbKe81oj0XpOImEHMN1QwfDar40WlDId8=; fh=S5hneWiyZz4X8veUkPPjeL1HVFrtQuhNWHzuXvlwJIE=; b=DpCZUnwVozNiNQ5AXxZDDLlSG6zuM1GKezAOAutf3O+OMDMMLaQuWof3CuhQlki3wU cAuEMDpOG++2hLEMX7eMpEt/3LNWqMd7308ukzpB5LCgsutwvwMHHjX2g68MbvNFdauA uGdyRy+RPmUp6uighEYcV2Uis+Xcls5OcaGnguQhmihkMJGsGJoaYqnci/jM3FsS+SM5 Qfo2OFviTzTbud61npLG/FNq9I9fUhRIHXi7EESHWA/Euc7fBiCYaNCknD4wJJR7dTs2 IrjukC74LV4W4+XNvoTZ+H2/hCmTtCyln741CmTWrxCRMaZfhS6tYSibwENnvj8BQiBJ PcnQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Cl4LJpQb; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-105645-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105645-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id o9-20020a656a49000000b005dc351748dfsi8054916pgu.121.2024.03.17.20.20.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Mar 2024 20:20:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-105645-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Cl4LJpQb; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-105645-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105645-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C72DCB23D23 for ; Mon, 18 Mar 2024 02:03:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C8DE220B0F; Mon, 18 Mar 2024 02:03:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Cl4LJpQb" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC5701E87E; Mon, 18 Mar 2024 02:03:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710727384; cv=none; b=Mt8QUMmDUCeuERpl31klCv8Z3z2MpGXziKj32es2c4DvLZAd8aAXPYRsk7P/ZWh7SVTzG9IYzZ7sQtM+bdCGGYJN/BacN5XkLcdvhCyN9wszOZMEwH8ZDxBQ11yI/X90tfgMVIEs5gN2MTjehDZ02WXz1tUJA7ACkbeq75r9sfw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710727384; c=relaxed/simple; bh=s2DTcYQv5t1E/AgG3AGAU+YYi9lLQeVvZlKV3Acyq9M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=t3bmTEdiAyqp1q3XaGdbWkeJM3kHW5qwF7yN9BjkHqVGg/t7dHtsrpD7+yTCqM9P3FPHRtNpJJKCASiuEem/IqH6KTWcozmje7etvBacyIyaxpwI8sdKcQt1LKVivU/UqrsNMCCI0NgkVVXhO1bL1wlWJvt5T2JwbZCQ5+bh41I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=Cl4LJpQb; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=nzZSUZc1IlLbKe81oj0XpOImEHMN1QwfDar40WlDId8=; b=Cl4LJpQbj38gTTSZEQUZ+1vpu3 kfvxEgbVIrASKys6zjX6NXQRWu09Lgn3IV65yLbtH4dUG8GB1Yqrznlf5YYQk37UR4dpnqVOEhv1o w2K5FOiZ3xKMvsyJFyxhLSnZwjPs1HCtxbr+tuF9JhbtLngwAWn7usG/oNe+6woPNU7cNjWJxlJqD ln0QmERP5F9CIT9MIbbXqzH0GBZ4M10aRQSSRBzUQIDZ7/9+/IL2GfU9AJDXFI35koQIIJJU8jO3B QMSHsOqDU3V3fvm5V+tc15IIGsSZnzBfpqlpQEctTDCEj3pPcRujHYO3Wr1dAgj7vx/NrDvJcf1hE buU9lkcQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rm2Ky-00000006zOo-2Ad2; Mon, 18 Mar 2024 02:02:53 +0000 Date: Sun, 17 Mar 2024 19:02:52 -0700 From: Christoph Hellwig To: Mina Almasry 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 , David Ahern , Willem de Bruijn , Shuah Khan , Sumit Semwal , Christian =?iso-8859-1?Q?K=F6nig?= , Pavel Begunkov , David Wei , Jason Gunthorpe , Yunsheng Lin , Shailend Chand , Harshitha Ramamurthy , Shakeel Butt , Jeroen de Borst , Praveen Kaligineedi Subject: Re: [RFC PATCH net-next v6 02/15] net: page_pool: create hooks for custom page providers Message-ID: References: <20240305020153.2787423-1-almasrymina@google.com> <20240305020153.2787423-3-almasrymina@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240305020153.2787423-3-almasrymina@google.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Mon, Mar 04, 2024 at 06:01:37PM -0800, Mina Almasry wrote: > From: Jakub Kicinski > > The page providers which try to reuse the same pages will > need to hold onto the ref, even if page gets released from > the pool - as in releasing the page from the pp just transfers > the "ownership" reference from pp to the provider, and provider > will wait for other references to be gone before feeding this > page back into the pool. The word hook always rings a giant warning bell for me, and looking into this series I am concerned indeed. The only provider provided here is the dma-buf one, and that basically is the only sensible one for the documented design. So instead of adding hooks that random proprietary crap can hook into, why not hard code the dma buf provide and just use a flag? That'll also avoid expensive indirect calls.