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 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.lore.kernel.org (Postfix) with ESMTPS id 9903AC021B8 for ; Tue, 25 Feb 2025 07:43:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QME+3JDwrUqrq8SilTHOaPJhJ/ckQHJayAqZ27tvt/Y=; b=qKHQC2wYMqzhfQVBJfekE7uRpj DNNYo0CB48g/TnaJBy3lU+fexdNBlS9SLRY89HptVhaQsKKZowQUh6lpPoFrZnef9jMjoMv14P3y8 5X2Qu3jIwDr8PxRQEtxshJm3LHnVyp/HPsI2NZYDj9r1VJfa/Z0cVqBxCiCfnunyFvNVjL36sOPkj 5DdCZit1uwjmwwP9q/dIZMNJuflSVSs4n5D7HlJ6VC0neFtQivsZ/ASPMHchTMc/rJy4PrFj45qLY X059B6B65pEFwV6kjOCw8bqjr0XhIz8mFLMkjr9UiQxckWgW0nZM9cJsQLEhti724ZntLw9bN8uPX F7NBJO9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tmpas-0000000GEfo-35jZ; Tue, 25 Feb 2025 07:43:06 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tmpYn-0000000GEKW-3cld; Tue, 25 Feb 2025 07:40:57 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id B2ADD61228; Tue, 25 Feb 2025 07:40:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E466FC4CEDD; Tue, 25 Feb 2025 07:40:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1740469256; bh=ieVX5d6YbG4CbbEuq39MSmzMjPRvSdy5tV/uQ7x4Blc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DyCwUZXionE7MxaCDSn4U72FlesRhQrFrGpuMkiOxiKqybMwty65HMnnUQtV0dWsq x7yf1ePenepDvJ7E87xmvqClkzk8+fAfDEKxnIAi7R5KdEWrq/HbBGK6/m824N9Aac l/wqdDYxYnTxZuXavRvIjBWLEcQoGK0tFSLRdgKP4cC/B9wTs4vNJBGhVFg/YUZjBa DyGpLBRzZb6r41IoQvdNrSFndL/1MSZxBxXbqTMC8G/XX8sPECLY2vNOeYn9agTBnv XprvoyMTyo3iA3MRoUHy8tQHkZD1ybG+SlCOHiI+8kBb9UqYcJF8jATpbmYw4ARQPa aHoMQW26rsx9w== Date: Tue, 25 Feb 2025 09:40:37 +0200 From: Mike Rapoport To: Wei Yang Cc: linux-kernel@vger.kernel.org, Alexander Graf , Andrew Morton , Andy Lutomirski , Anthony Yznaga , Arnd Bergmann , Ashish Kalra , Benjamin Herrenschmidt , Borislav Petkov , Catalin Marinas , Dave Hansen , David Woodhouse , Eric Biederman , Ingo Molnar , James Gowans , Jonathan Corbet , Krzysztof Kozlowski , Mark Rutland , Paolo Bonzini , Pasha Tatashin , "H. Peter Anvin" , Peter Zijlstra , Pratyush Yadav , Rob Herring , Rob Herring , Saravana Kannan , Stanislav Kinsburskii , Steven Rostedt , Thomas Gleixner , Tom Lendacky , Usama Arif , Will Deacon , devicetree@vger.kernel.org, kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org Subject: Re: [PATCH v4 01/14] mm/mm_init: rename init_reserved_page to init_deferred_page Message-ID: References: <20250206132754.2596694-1-rppt@kernel.org> <20250206132754.2596694-2-rppt@kernel.org> <20250218145904.x57chhz3whvckzu3@master> <20250220083601.4p6ehmfhyvs5q5io@master> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250220083601.4p6ehmfhyvs5q5io@master> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Feb 20, 2025 at 08:36:01AM +0000, Wei Yang wrote: > On Wed, Feb 19, 2025 at 09:13:22AM +0200, Mike Rapoport wrote: > >Hi, > > > >On Tue, Feb 18, 2025 at 02:59:04PM +0000, Wei Yang wrote: > >> On Thu, Feb 06, 2025 at 03:27:41PM +0200, Mike Rapoport wrote: > >> >From: "Mike Rapoport (Microsoft)" > >> > > >> >When CONFIG_DEFERRED_STRUCT_PAGE_INIT is enabled, init_reserved_page() > >> >function performs initialization of a struct page that would have been > >> >deferred normally. > >> > > >> >Rename it to init_deferred_page() to better reflect what the function does. > >> > >> Would it be confused with deferred_init_pages()? > > > >Why? It initializes a single page, deferred_init_pages() initializes many. > > > > See below. > > >> And it still calls __init_reserved_page_zone(), even we __SetPageReserved() > >> after it. Current logic looks not clear. > > > >There's no __init_reserved_page_zone(). Currently init_reserved_page() > >detects the zone of the page and calls __init_single_page(), so essentially > >it initializes one struct page. > > > >And we __SetPageReserved() in reserve_bootmem_region() after call to > >init_reseved_page() because pages there are indeed reserved. > > > > Hmm... I am not sure we are looking at the same code. By "currently" I meant the Linus tree. > I take a look at current > mm-unstable, this patch set is not included. So I am looking at previous > version with this last commit: > > 8bf30f9d23eb 2025-02-06 Documentation: KHO: add memblock bindings > > Here is what I see for init_deferred_page()'s definition: > > init_deferred_page() > __init_deferred_page() > __init_reserved_page_zone() <--- I do see this function, it is removed? > __init_single_page() > > What I want to say is __init_deferred_page() calls > __init_reserved_page_zone(). This sounds imply a deferred page is always > reserved page. But we know it is not. deferred_init_pages() initialize the > pages are not reserved one. Or we want to have this context in > __init_deferred_page()? In mm-unstable the code is slightly reorganized, but in the end it still initializes a deferred page. It's just only called for reserved page, but the initialization itself does not presume that the page is reserved. So both functions are misnamed here, __init_reserved_page_zone() and init_reserved_page(). > -- > Wei Yang > Help you, Help me -- Sincerely yours, Mike.