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 62E2EC369B2 for ; Mon, 14 Apr 2025 23:30:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4E8BE280103; Mon, 14 Apr 2025 19:30:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 497192800B1; Mon, 14 Apr 2025 19:30:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 386C3280103; Mon, 14 Apr 2025 19:30:07 -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 19A042800B1 for ; Mon, 14 Apr 2025 19:30:07 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 47758AFAA9 for ; Mon, 14 Apr 2025 23:30:07 +0000 (UTC) X-FDA: 83334244854.11.B17CC8B Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by imf10.hostedemail.com (Postfix) with ESMTP id 86F63C0004 for ; Mon, 14 Apr 2025 23:30:05 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=HBDAGf0z; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf10.hostedemail.com: domain of kuba@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=kuba@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1744673405; a=rsa-sha256; cv=none; b=5ttEC82NnkCQREQObi6ZANAmm4sd1Rrg5Cr5U8YTyiK9MEOTfXkjfTcDhzRe1NSZbU3qTp PFUjJHNAZY8eun9fiLsl1PYzHOYvMwg1KLJizAKKVZUeZMSvKWTJVnkNCc3xALoIKbxaZA pWXj1GmMkFkW+nSUY6alS+nocbiHWgE= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=HBDAGf0z; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf10.hostedemail.com: domain of kuba@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=kuba@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1744673405; 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=Aqylv0oe0b11M18S/kMKueTfLEIoasPmyl5EQZx/uEw=; b=ixRiBJyYWYPUdBEKEjXxeXd7PSDuAemXym/+i9oCYR+vC9ElNW+tTZifQ5vopf0eZH8ek8 8eLSQxKcMik2MfYXozq77cNEZgtQ4jmbQRBgW/OyG5tg5a+scFstnLFfbKl4omZF1WLG0h 4DFmRzC2FJ6GZipJ2lDaizrJcU5br74= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 165BA43D75; Mon, 14 Apr 2025 23:30:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96A41C4CEE2; Mon, 14 Apr 2025 23:30:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744673403; bh=9FPxyHvmK86b7zqc4lYgfC1sZb0i4TzzabkBuGotnds=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HBDAGf0zYFWzp6m1ye8QZC73cQWwlQ3pSDPvnmigCO6mksYbH8hwitr1tiuk1MA+z EzI5Xoy7QModP55AB01nGamhEALPot5YhNFplpxGW6rW+5/wldc5JuxLYUAU+6iTZE GCcGI/isQCsUMR5sK30mTkIRlIl/CJA32wdiKqzSWetAt2cVX7whIe7nnYn5UBVaCE Z9SkqykpGa2aDEhQ4pPz5/0d/dAxFklElRkFXrxTXr0s1n+dWVHUbEKxw8xwBBUQXp CtAFF8ZapZXKNL1RfHv+iYbpfM8sxsHcUb1RNWA5B9AXovAI3zR1Ieiqg+pj/qQ5sz NyZIBiGcn9eRQ== Date: Mon, 14 Apr 2025 16:30:02 -0700 From: Jakub Kicinski To: Byungchul Park Cc: willy@infradead.org, ilias.apalodimas@linaro.org, almasrymina@google.com, kernel_team@skhynix.com, 42.hyeyoo@gmail.com, linux-mm@kvack.org, hawk@kernel.org, netdev@vger.kernel.org Subject: Re: [RFC] shrinking struct page (part of page pool) Message-ID: <20250414163002.166d1a36@kernel.org> In-Reply-To: <20250414015207.GA50437@system.software.com> References: <20250414013627.GA9161@system.software.com> <20250414015207.GA50437@system.software.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 86F63C0004 X-Stat-Signature: 8fn7im6cdpz89w7maqpke3ikkwmor3wy X-HE-Tag: 1744673405-454524 X-HE-Meta: U2FsdGVkX1/KbviuZ9IvpjQQJg5DIay3Bb5ZviUjJN7zKgtr+Sl+4RCP/HW5J8NdD8H+OgZdEDahL+CC3Lr/4Xd+x9IllPFGt3MbA0EZcWuQy+cHMw60ogmnz6GHkF8YxUkEIHS/pHMjBYrHecsk6+i485pu68yiozwKTMQa8swDwfxujoaBR4cbsHkbrCQMQXCtkT3/BP365c2270vRZxu8b9yIeGjMlro4zf4CiBJd8odngW0eX+M8CtHm6l8bE+TtyCeH1gddktokEv8Y1JFPKZjLCKAeRcf/kZPlbxokkU91T/DjyVGrjRkQgRgChZ63YHgDtv1mplJRp4a/dDCanAY3FmymaDEvyCE442EjAiktaTomU3x/wmY3uV45AU7hi3yL3RtbuL7BWHvlVl5tfz0f+QePjcDiFylZE3WYOGl//TP0lROuVqJeS/SpU9sxLYe6bbXuDdySmJg5dq33Qq7WU4oHZLfiUJQQnthE2SdMfgnqDnfqMkgLLrp5BJCB5LNHHnq3heJBszwm0QhPMLABDjAillTcPLpQ+q7+u1ayohhYmK2FmGgLcFe0HTs4rnIPl0Ptb3yQrzjk4XLTm1jCdKkc5KSDkObtFyo27bX/ZHf8wiH25jssze09qCLG+rxkXANxys9SjhCPl+TZwr1WVsegMlLmamx7y5q86WVTJY5K+xAM4qLNRh2kKDTcDGyTH3xKIbWaSpK1w/6RLsRxRkzfC/17TedtSLD2obFItFDs5w2RkyZ8CjwAOR5PBKkODczUdPKMN5Nf32UsPN/g7FtfxsHIhbQCw7NMmcED24byc23+qNSQuHwPAXHUIIPO5ZUMrydPlLAUBB2B62S8bpRZS86nQZDKbdnvKlMV0na8sP/e3lz171P/UgdHLAJKQy28gcJ9ECsgUGEdXNTJ6Azgrau/4UxrtXzw4NsE6PQKv4wx48Fb/w61abBztobzreLqENwqrcL SMd8Z/c9 AaMxNtLJBvbYNMkF848fhF1evdcmfVlY/Jw/P0WKL8uoUkIOzoNtPcnTzLTmnrdNvii0cZjOHaaatrOUC6Lf66jahvPGPiuMQc2i22KwYlBb1eFGGlqRZC5UXZ57oA4G1kd79HxdfCfkZfh6HmUhr58WJrX0mKd2PNZMVeRkihIqO4hAkg7AfCWr0P9QKX7MzVPDjvP75X5ixckkIVCi4qTUWK+cYwB74bsyvUiaexfIP11BW+EeDxeSGHiWYuXTA2dEpboyVQ4Qk/p7VrIb2t0TKlEgr68hg6G6JYy6EgDHLZjn2XIA4Zb0fDg3nuDAPDRWkSe1v0ToPGHk= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000011, 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 Mon, 14 Apr 2025 10:52:07 +0900 Byungchul Park wrote: > > Fortunately, many prerequisite works have been done by Mina but I guess > > he or she has done it for other purpose than 'shrinking struct page'. > > > > I'd like to just finalize the work so that the fields above can be > > removed from struct page. However, I need to resolve a curiousity > > before starting. I don't understand what the question is but FWIW from my perspective the ZC APIs are fairly contained, or at least we tried to make sure that net_iov pages cannot reach random parts of the stack. Replacing all uses of struct page would require converting much more of the stack, AFAIU. But that's best discussed over posted patches. > > Network guys already introduced a sperate strcut, struct net_iov, > > to overlay the interesting fields. However, another separate struct > > for system memory might be also needed e.g. struct bump so that > > struct net_iov and struct bump can be overlayed depending on the > > source: > > > > struct bump { > > unsigned long _page_flags; > > unsigned long bump_magic; > > struct page_pool *bump_pp; > > unsigned long _pp_mapping_pad; > > unsigned long dma_addr; > > atomic_long_t bump_ref_count; > > unsigned int _page_type; > > atomic_t _refcount; > > }; > > > > To netwrok guys, any thoughts on it? > > To Willy, do I understand correctly your direction? > > > > Plus, it's a quite another issue but I'm curious, that is, what do you > > guys think about moving the bump allocator(= page pool) code from > > network to mm? I'd like to start on the work once gathering opinion > > from both Willy and network guys. I don't see any benefit from moving page pool to MM. It is quite networking specific. But we can discuss this later. Moving code is trivial, it should not be the initial focus.