From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 050EE3B3893 for ; Mon, 15 Jun 2026 13:19:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781529557; cv=none; b=rJOzmlsI6fLYpcER2+htu5bNopYqPog3Hl6HW1l3IPS6eCFA9QJpETbKvggdJHWRchqNmEhvclqrOAbTRTLhGxv2l7N5A8sn7D5/pS+15PvDt25T8ODqPDuR0xwKrhWyUnQ0fYFlubwEMwfFHaQAebqY6IusunQVlbE6NRpDKG0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781529557; c=relaxed/simple; bh=/ghm/n9Q0h7QZMUo8DeGuSCmLNh6ss7E9TCBNXYjzAA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=H7khry5DTZr4sTMFtNIsYZwOJt5nezdbj4PMS2vxBtG+Tyd+unguJDPLfyc06hmgOEKxhsVgDtYNERVqDa7PTIw7/n6vlHWO9JdpyDSXxTDzEJyNNa8PIrofdfky3wM+tsaJr7riMB2S+gUZehG/aqc8QDf/kfCEAwv+Fo15X8g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Mf/t1n2d; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Mf/t1n2d" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B00701F000E9; Mon, 15 Jun 2026 13:19:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781529556; bh=GWS/64/tkYjcSZn0+hqm9aXVQVkFIYWRXsZULuD0LK4=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=Mf/t1n2ddz2qMaxadwsFp4vho15rywK7816pf4mxJrKsZhDJ0TvwIs+YKd4J4Q2u/ qvbkqn2IOmk0OKNkeA8coBYRcA2K6hn72O3Tmh9L3O6usnClSS7F5aVuPLCl86nMs2 7/MYCDStyI5jPgMsz02xpx0/6Zw1ydzTFK1+6PrPlbuY5NcY1f7Nxw3BuU8vzSQQcK L2svRO0qN2C85ojeMSMlvJ0zhaHTOlBGhE+Z6sH4oViQcE9NO+ZLBb9Gtlla0AFPu/ eGkWfxluf1yr2bJ3AE7TtxQI/BI5hJ0j0FpAmmba4mT98cEpzthtGkDbl0Dn5WvI7d Dk7H1D/mh07Dw== From: Pratyush Yadav To: Mike Rapoport Cc: Pratyush Yadav , Pasha Tatashin , Alexander Graf , Muchun Song , Oscar Salvador , David Hildenbrand , Andrew Morton , Jason Miu , Jork Loeser , kexec@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 14/18] memblock: use kho_scratch_overlap() to decide migratetype In-Reply-To: <178143855115.2123877.12922508735700031761.b4-review@b4> (Mike Rapoport's message of "Sun, 14 Jun 2026 15:02:31 +0300") References: <20260605183501.3884950-1-pratyush@kernel.org> <20260605183501.3884950-15-pratyush@kernel.org> <178143855115.2123877.12922508735700031761.b4-review@b4> Date: Mon, 15 Jun 2026 15:19:13 +0200 Message-ID: <2vxzy0ggosa6.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Sun, Jun 14 2026, Mike Rapoport wrote: > On Fri, 05 Jun 2026 20:34:47 +0200, Pratyush Yadav wrote: >> diff --git a/include/linux/memblock.h b/include/linux/memblock.h >> index 5afcd99aa8c1..546d7ef798b8 100644 >> --- a/include/linux/memblock.h >> +++ b/include/linux/memblock.h >> @@ -618,7 +619,7 @@ bool memblock_is_kho_scratch_memory(phys_addr_t addr); >> static inline enum migratetype kho_scratch_migratetype(unsigned long pfn, >> enum migratetype mt) >> { >> - if (memblock_is_kho_scratch_memory(PFN_PHYS(pfn))) >> + if (kho_scratch_overlap(PFN_PHYS(pfn), pageblock_nr_pages << PAGE_SHIFT)) > > I'd move it to kexec_handover.h and kill > memblock_is_kho_scratch_memory() in the same patch > > BTW, please double check that the extended scratch does not require > updates to efi_init()::reserve_regions(). It does not. efi_init() happens in setup_arch() on both x86 and arm64. The extended scratch is discovered after setup_arch(), in mm_core_init_early(). But I do think this is worth a comment since the interaction is not obvious at all. -- Regards, Pratyush Yadav