Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp857430lqs; Tue, 5 Mar 2024 21:02:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUIoN3DT3eIwSp+y6gM2XJo8HyVBOb0euV+GFL1lXAhsrdyyFOZ0oISoqKSD6b/3/+N1w6jzb++NhjorXb7KD43hFiKktJeX5ze3jXkDg== X-Google-Smtp-Source: AGHT+IGgT4TwgFb0zPTTKZPRDsHVOzNa15cEYM8bx5dL2z41+IlnanNlZlN/D4euv275bCpllgoB X-Received: by 2002:a17:90a:4285:b0:29a:be15:9c90 with SMTP id p5-20020a17090a428500b0029abe159c90mr13013452pjg.34.1709701349033; Tue, 05 Mar 2024 21:02:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709701349; cv=pass; d=google.com; s=arc-20160816; b=m6afSkZa9R/0gyQyufeaqQm4/vSUyQcktT58nPNvDFJenv/qt6VgCXSX9sxjI2axVP D9trCYP4mzCiIlUjvVDm8AB5S7YSlbVvRxxYW5HWQ3i7si24xi7hY0BC+9DQc7o31BHP +EjWzsqBxb72b2fa/ACGAc4BwFmDpuzIvlTPrQR4SSrDgSRqwP1SrDlv3zPOUZwFiTam wXji5tA4WkM5SDMMcBHkOY868evsWVKDzLCVlznWCDuSJqTUF5x+7vCCJ4M5McM5J6HW 3e3Gj4vKKGccPG4/Xq4eMZ4XyeetTWhy1jbdOZAcE7z6ZBJk/qMjAaYpzk8IR2PRqOc8 HgsQ== 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=jL7LWnaopqqB5nwV+btClF0x89yXnbnHF4XK+f8SkuU=; fh=/Crf7Xx7S3Fs1DH61MB4pBvpiDbmn0DSEgNsglCK5BY=; b=n/38BIK8NnOajLZrI2UQ8K5WJ6A7I3eWXunwAN2ygBuyAQMez1XX4Wk4KbugJtx0Db LwpIgfYv/yINvz4bA6gmM18vplsgsEWHai8FB57f7D8l2RynODQ+/6aAzUgdpgZ9cYp/ HCu43pYw8+kQj0WRK6hIRbdCGffvw1SXXxPfzfJWs5bYsJGTosufuDRfaQ94ft4Lm+Xz fgvCSW0b5ZZ5hKG5/g7D1Y529QOlRXdEH1i/mjZCTUbl+j26lMf0L+/edPZA7tLYrlDf 7EyroZ3qZBsTJVFO4MUjhbVnYeltVH+3VLCcKiI91tiE+10szV32KGaAtbg+M91jKZy9 Tvaw==; 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="jf/buExa"; arc=pass (i=1 dkim=pass dkdomain=davidwei-uk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-93030-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93030-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g7-20020a17090a708700b00299303a935fsi13327712pjk.42.2024.03.05.21.02.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 21:02:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-93030-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@davidwei-uk.20230601.gappssmtp.com header.s=20230601 header.b="jf/buExa"; arc=pass (i=1 dkim=pass dkdomain=davidwei-uk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-93030-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93030-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 901DF289547 for ; Tue, 5 Mar 2024 21:55:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7720712D209; Tue, 5 Mar 2024 21:55:10 +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="jf/buExa" Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (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 91B9112CD8B for ; Tue, 5 Mar 2024 21:55:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709675709; cv=none; b=iLQxBdg2O54LeS9Fq8/a9mgR3A6DnhQL9p4hq3kp/eOE20VfrIKpQPKQfLGQtNBUG+47S9QfQfdyP1R9cA5BSBOZXEzELHEKYj2JS6rms2Al9zqZjVmaVbUdoxl9fL6aqwt3wbVp37GJ7NshJ+ALwMHjykOQw6jp2NBd9DAqqF0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709675709; c=relaxed/simple; bh=h9sa7Dchu6Y4OGHI9oq7OqF0wGe96fcS2Tveig7CW4g=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=I+avHevsowDCvH2P6X44rMB7dtsG8ibhGxmAAufAgma63EOHimkFfaqz0Bw7gouLAZ6Cz1AAuBLVXMCCyRZ7BOCx5sEGKbLpoLQSwmEppdH0yL1pTmhn8cvSR3KCryeIcSZMFhAIU9ZqceIV0R03TbxfV0+ArftPB8n4OwiZ9Wo= 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=jf/buExa; arc=none smtp.client-ip=209.85.214.169 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-pl1-f169.google.com with SMTP id d9443c01a7336-1dd178fc492so19280655ad.2 for ; Tue, 05 Mar 2024 13:55:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=davidwei-uk.20230601.gappssmtp.com; s=20230601; t=1709675707; x=1710280507; 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=jL7LWnaopqqB5nwV+btClF0x89yXnbnHF4XK+f8SkuU=; b=jf/buExaxblTiNX6U0KWkwLuiRLT1GJXW3PzcId0FEqIhUZc+U+l2XzUcfdU9f6U6H eZ6qS1OUgpN/Mi4QPCl/TlC/tsBXKDqUNBSCjLdA7D50BHAGjnFQh2ix70Ug8ajZv6LI 2BQUhIzS23rqqQg2whV7l1x61HCglhHbd1mQT1U9nhm4xXnHBKo+Wl+b/TIqdAozeFdm E2u7RWG+/3U7OornAB6tVlfx51bL+8mkviKOPToTq4R77g8EHmSsbYSw1Jvb8f5Il52f b6OqjxnXlO6F2LUG7iEiWuIff+Ytpq8yZfTGC14LfVk6UpugN1GuFJFhugvtcEuuEhi3 2tZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709675707; x=1710280507; 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=jL7LWnaopqqB5nwV+btClF0x89yXnbnHF4XK+f8SkuU=; b=HFxxANFzW4yys5Xjqu2RH0ir2LS+LCGjkElcq8bNeJyTnZrjTqnbTh/JvDHG9SvooQ 2CwV0D+6nuMZMvm2VNSc+yeB2Wlo0cwCcbi6iVevZ7cXnp1ce1JRBjgFWCPj6BDl42P2 B5Prqpqjkd39wNLJwfnZJe2OfBpcBm0kvXGXJqqhvYcIDWdrpvLtfVIBDcD8/PsZcskM LunCOrkUjq3crOR6eakOGX8c5IG+u+g3H8BMpbaLpNN4j5T6SUsYsS9O0YhRiRIE5cdA pUT8KmwpGeTCgPjzk3X4FI4KmSCLrCBIujARj07j0uihQ8LVnoMsJraFGwCK2tw7FkMS SQNw== X-Forwarded-Encrypted: i=1; AJvYcCU0bVUS5K5bzE2tBzDZ7G1byCiw1L1TsdBGTKcc3SF4EZ0Ss+eZd62HhnkTIwpCnzpVruVdViuXY5DL55/wg9DUaVa75kfgl3n+nxBu X-Gm-Message-State: AOJu0YwymjwnFR0bc1rQi8fiiINfYWihZMSo4EZnqG5bN95xASZ3TD+i kD4zWszR7iZIYc0AdvgoVebY21IvjFDdplC/VDjttNGIN0zIBKK+dmC1xsk6scc= X-Received: by 2002:a17:902:aa86:b0:1dc:cb04:82e8 with SMTP id d6-20020a170902aa8600b001dccb0482e8mr2800530plr.22.1709675706778; Tue, 05 Mar 2024 13:55:06 -0800 (PST) Received: from ?IPV6:2a03:83e0:1256:2:c51:2090:e106:83fa? ([2620:10d:c090:500::7:4943]) by smtp.gmail.com with ESMTPSA id w7-20020a170902e88700b001dba739d15bsm11097297plg.76.2024.03.05.13.55.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Mar 2024 13:55:06 -0800 (PST) Message-ID: <1b57dac2-4b04-4bec-b2d7-d0edb4fcabbc@davidwei.uk> Date: Tue, 5 Mar 2024 13:54:59 -0800 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 v6 02/15] net: page_pool: create hooks for custom page providers To: 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 Cc: "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 , =?UTF-8?Q?Christian_K=C3=B6nig?= , Pavel Begunkov , Jason Gunthorpe , Yunsheng Lin , Shailend Chand , Harshitha Ramamurthy , Shakeel Butt , Jeroen de Borst , Praveen Kaligineedi References: <20240305020153.2787423-1-almasrymina@google.com> <20240305020153.2787423-3-almasrymina@google.com> Content-Language: en-GB From: David Wei In-Reply-To: <20240305020153.2787423-3-almasrymina@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2024-03-04 18:01, Mina Almasry wrote: > +struct memory_provider_ops { > + int (*init)(struct page_pool *pool); > + void (*destroy)(struct page_pool *pool); > + struct page *(*alloc_pages)(struct page_pool *pool, gfp_t gfp); > + bool (*release_page)(struct page_pool *pool, struct page *page); For ZC Rx we added a scrub() function to memory_provider_ops that is called from page_pool_scrub(). Does TCP devmem not custom behaviour waiting for all netmem_refs to return before destroying the page pool? What happens if e.g. application crashes?