From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E205EC27C53 for ; Thu, 13 Jun 2024 00:10:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 76FF96B009C; Wed, 12 Jun 2024 20:10:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 71F136B009D; Wed, 12 Jun 2024 20:10:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5BF766B009E; Wed, 12 Jun 2024 20:10:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 3FDD36B009C for ; Wed, 12 Jun 2024 20:10:41 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id AB7BC1616E8 for ; Thu, 13 Jun 2024 00:10:40 +0000 (UTC) X-FDA: 82223934240.10.75889CC Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf25.hostedemail.com (Postfix) with ESMTP id 5F3DBA000E for ; Thu, 13 Jun 2024 00:10:37 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="mz/ZQ4SN"; spf=pass (imf25.hostedemail.com: domain of kuba@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=kuba@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718237439; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Nv2O89A+dr+tGgTPPHnZVbINBUgetoXh7+oMgvyIwkM=; b=qe90/KipdG3TODwqTiFhMQ/o4LKOaNmOFxALEFnxwYYgEMFKHaeu5TYiVmFZ4a2kRGMPe0 OGcF9E7vg46ISxhis3dJYhfaOdDGsrIfGSSv3YS+PB/V2zUpsgCsYlGphMMqbsF7sonSjC BYjc16XR6o56evKXi6x8CX1V+oWLYY4= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="mz/ZQ4SN"; spf=pass (imf25.hostedemail.com: domain of kuba@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=kuba@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718237439; a=rsa-sha256; cv=none; b=6v4RxZ2wsikuttqtnPZ+EykRMtCZUMxggQjwB8OStvNi0hDAEotCH2sequ/8WoKmQsIZkJ zY+/0S49Swn7GaWIB369PLEw7j9dblIylIl8y+bIY3k6HhDpAR96BGSzPt6V4wC3R/J7uF cZi7AKnn2nfL1NgP6HMckbHSJzfa/jQ= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 0F123CE2222; Thu, 13 Jun 2024 00:10:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09BC8C116B1; Thu, 13 Jun 2024 00:10:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718237431; bh=ALaMOklo/D6m9out9qebU875GAFWtP61hk1J63pvt/w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mz/ZQ4SNRhD4Slftyf1RGHhLam/Qf7W3PwDTBqymj8MrjJ2zFfcEBpzzqoIp7aIRE +HNQhNVE1+IOeDAWgqZssDT0yMjs5KujxGNYD5/v0d4xLqGdW6Z4IfirrVTI0gfG77 pMXEtZ7kL2cG4kkEGdlkXN+sdZwbMnbryjY9PGB3jmEupZmxCvx/3ljnSDJVkMYjc3 aerFM5mLp0PJV3xP/U6IojVO32XHdmwSgJHAiTk7a4PvwYlAlAf0U2KtXvJacugqV3 /CEmWSpj8No1QubiV6AWTL6traVV8XO5JJaskmf2fawRbrkUX9ZG4c4dRG9FtdOikt K1w3nC+pECkGA== Date: Wed, 12 Jun 2024 17:10:29 -0700 From: Jakub Kicinski 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, Donald Hunter , "David S. Miller" , Eric Dumazet , 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 , "Christian =?UTF-8?B?S8O2bmln?=" , Bagas Sanjaya , Christoph Hellwig , Nikolay Aleksandrov , Pavel Begunkov , David Wei , Jason Gunthorpe , Yunsheng Lin , Shailend Chand , Harshitha Ramamurthy , Shakeel Butt , Jeroen de Borst , Praveen Kaligineedi , linux-mm@kvack.org, Matthew Wilcox Subject: Re: [PATCH net-next v11 05/13] page_pool: convert to use netmem Message-ID: <20240612171029.71adc273@kernel.org> In-Reply-To: <20240607005127.3078656-6-almasrymina@google.com> References: <20240607005127.3078656-1-almasrymina@google.com> <20240607005127.3078656-6-almasrymina@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 5F3DBA000E X-Stat-Signature: yfuizi9xruxiyoasi5g6gicc7mzkw7jk X-HE-Tag: 1718237437-362824 X-HE-Meta: U2FsdGVkX1+6uewiDOMYgcRxjmePdyMdatheOnNOp1HovjsCE6y8jkPU/jusHQj2j33izJmoEX6QMejRKh/zz3vmIk93xMZCAKp25LpxojfBFBD7fvaofKFvNdobpFs92S4U5ri1ZdtR0I+5PcYOW9+2GVfPLtoDRpDyV1WuzWBZNbipzMYJwnhKo77TexgnndBbH+5uV4h85UV5Wsm5QFFvzQQzxgqxM+PSxNZOaT/Rj5gzd0B3WVxM6/0gAc45PY/qyJwF/zRPBQkfAUc/fF1Kg+cN54KfEo/R9S2kBaMzeGZwN/zUguQHKhqN8yBJC4v9V9XFpMuHAcHFmHHp9y9CfEKXl3oDbQ02TsXXzuhj8Lapq8AddDqqgrieRPQvT1QxV/aGDaaaHEOY6NCXnZAEilTzQg70AZW2syP7VBZyTmJqfAaPK8saoTWaUHQFoOb91SAydU8+pwiFVnTJdEoc3vkyEaQqDe0gduaTBK6WuiXPmXRRaoeoospQNwwv0CtYgacMh2+DPljGaS+dQsI9T9Q/FeFZwjXAxR4NifXTYQzwk80xA1x0rAjtqtyGqiJLHBHEp7TiAO8ZIs+MeOjA12W3V+TVGGwawlY4O6k1yMkzlkz+zY7Utq21OZMvzyGpe70XxgbUZ8VoWus2UTOiKMi309yt3hBZiZRlSG4Uns47qwhE3PsvRLhk/NbgSGMsfF0jJJCPCMaS78BhMd72QDHWOAbeEGkTh5IKB+X2ABfkONnrQuJ8ZQgND4TymriMLHVk+LFi43SfpiOYqW+ZnMy+rgnLUq4TZtAg5+UxT68D/T0LqkKv8C/rJQdtIvxsjiymcIZlChpzkF2UQqaf73LnZrB3/hA4GO3QD11lQqCaX8Bj3qgr7cxFcUJ2U5N3MEe/DZmWXJ3JGl3X9Z7va3Yrn0LhnDcCMjmK3qRYwg8nmFTLOofBxdIKT5xDIyM+J+5iwif1z0OeQxF cxiYUTCh 9Yp4RloEoea+nbMtvglVBJtEyd1J6kmvatSYFwHqtKFbY3KKXFCVWQOK/YKUAhKwnynEO/EVWwpIE+0lvd/9jJgM8NL5xq+UXEtocrlfAAwVUxEk/D9WWNoYEJGVIh8nSDXO4D0FKZCxYWEhtZ+N5MwXHOBFxPCRXhXCOL51nTc46uj5uCS5Q02JqQJS0JU6/Z+lbdDCHEhaS6DczfTG1YfSlYuJATk1OjxOCG3spJr/+v3WJRQ2BogxAeOaLRuSPGJ0kpofcQcH9Ye1Lc5e2Dojgb9ts78Ob/i0i1mNb619J6VyUNgwyC8gEyaIY4TUVXE2TgaSmk16P9j3chX1Og/8syg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Fri, 7 Jun 2024 00:51:15 +0000 Mina Almasry wrote: > Abstrace the memory type from the page_pool so we can later add support > for new memory types. Convert the page_pool to use the new netmem type > abstraction, rather than use struct page directly. > > As of this patch the netmem type is a no-op abstraction: it's always a > struct page underneath. All the page pool internals are converted to > use struct netmem instead of struct page, and the page pool now exports > 2 APIs: > > 1. The existing struct page API. > 2. The new struct netmem API. > > Keeping the existing API is transitional; we do not want to refactor all > the current drivers using the page pool at once. > > The netmem abstraction is currently a no-op. The page_pool uses > page_to_netmem() to convert allocated pages to netmem, and uses > netmem_to_page() to convert the netmem back to pages to pass to mm APIs, > > Follow up patches to this series add non-paged netmem support to the > page_pool. This change is factored out on its own to limit the code > churn to this 1 patch, for ease of code review. Sorry for lack of meaningful review, busy times, in the meantime: drivers/net/ethernet/renesas/ravb_main.c:306:16: error: incompatible integer to pointer conversion assigning to 'struct page *' from 'netmem_ref' (aka 'unsigned long') [-Wint-conversion] 306 | rx_buff->page = page_pool_alloc(priv->rx_pool[q], &rx_buff->offset, | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 307 | &size, gfp_mask); | ~~~~~~~~~~~~~~~~ -- pw-bot: cr