From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C66472144C7 for ; Tue, 30 Dec 2025 17:18:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767115095; cv=none; b=X8VUxhnbGWQBcuHHeHm0oFM6z6Xbih8IPC9cmXNzx6V6zBS8H8RM3KeFPMXgnHeFs4OxXv0hYn5OnWlwV/Bs10+x688KIfgDRjta1zKAg2VJtrTe5XhDN2jF40u54isgVu+yHU0OB/y2TJ34Pmrb0X0QlZF9D+pUkSfgPvcasKc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767115095; c=relaxed/simple; bh=L0yfA8iQeAPZwmgn/JwVdXX5YqxPFm2orAje+7+04ns=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tprPmYpAYscGd8pRLUufNvEkJcknuZopyAR5MOV+r3SlCKHSlp9K8ycLfTqsFsa0fpccBrBNYm6IlmHMxjCoaNOdjKJd7MAmoS1qrO0kIk2FcRkUzihzAQozhGq96GhjKbsL2ql5fLvwB5aqXc9KvFqNBK1s3UzqiO3hiS1wiVg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SYM3oo3U; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SYM3oo3U" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD8ABC4CEFB; Tue, 30 Dec 2025 17:18:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1767115095; bh=L0yfA8iQeAPZwmgn/JwVdXX5YqxPFm2orAje+7+04ns=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SYM3oo3UppMQ0vCZ2e+dnJ9iWV/Fm/7le8GBKEsJYssAPtlRd3gl6TSDH0kOHsuuE 2CK/6r3yvigVKD8DqO17s1dpTjoa45N0j+MoZi52GF6iRNyxhBCbhU/4E6UVLi5u/I Cvrlc9erJL8EflwAmBYCX0WQ9F9j5xzUYvyeFrtu8kKozKh5agFWOGCdd763muMTV2 3KR3v/cweWyWwdc2n1IOj15lQzg/bjmdeRVsqwbJ4Y6/NqVvLS/BX22wy0FiBxjMWG 9VSE4JR3Zdbke7u2irGUc6nFZPxXCUbv2Xl7dLVca4/9SsPvSKDJ4S/5CIcz3HkhoN es6ZQlUcsmseA== Date: Tue, 30 Dec 2025 19:18:08 +0200 From: Mike Rapoport To: Pasha Tatashin Cc: Pratyush Yadav , Evangelos Petrongonas , Alexander Graf , Andrew Morton , Jason Miu , linux-kernel@vger.kernel.org, kexec@lists.infradead.org, linux-mm@kvack.org, nh-open-source@amazon.com Subject: Re: [PATCH] kho: add support for deferred struct page init Message-ID: References: <861pkpkffh.fsf@kernel.org> <86jyyecyzh.fsf@kernel.org> <863452cwns.fsf@kernel.org> <864ip99f1a.fsf@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, Dec 30, 2025 at 11:18:12AM -0500, Pasha Tatashin wrote: > On Tue, Dec 30, 2025 at 11:16 AM Mike Rapoport wrote: > > > > On Tue, Dec 30, 2025 at 11:05:05AM -0500, Pasha Tatashin wrote: > > > On Mon, Dec 29, 2025 at 4:03 PM Pratyush Yadav wrote: > > > > > > > > The magic is purely sanity checking. It is not used to decide anything > > > > other than to make sure this is actually a KHO page. I don't intend to > > > > change that. My point is, if we make sure the KHO pages are properly > > > > initialized during MM init, then restoring can actually be a very cheap > > > > operation, where you only do the sanity checking. You can even put the > > > > magic check behind CONFIG_KEXEC_HANDOVER_DEBUG if you want, but I think > > > > it is useful enough to keep in production systems too. > > > > > > It is part of a critical hotpath during blackout, should really be > > > behind CONFIG_KEXEC_HANDOVER_DEBUG > > > > Do you have the numbers? ;-) > > The fastest reboot we can achieve is ~0.4s on ARM I meant the difference between assigning info.magic and skipping it. > (shutdown+purgatory+boot), let's not add anything to regress, as every > microsecond counts during blackout. Any added functionality adds cycles, this is inevitable. And neither KHO nor LUO are near the completion, so we'll have to add functionality to both of them. And the added functionality should be correct first and foremost. And magic sanity check seems pretty useful and presumably cheap enough to always keep it unless you see a real slowdown because of it. > Pasha -- Sincerely yours, Mike.