From nobody Sat Feb 7 19:41:11 2026 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 4DDE139A805 for ; Fri, 16 Jan 2026 16:54:29 +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=1768582469; cv=none; b=gIuxLLpdk+FZc/GYFXzKovulWpuQQDtjj+YHDceyx/+5ZcwlEGWNyNJm5WcPHuu/LI86LcQAw1zRIp5P1ofAU1REJJ9cJUjTy+tDimxrSPsjR6PZ3ZtA7KEMMNyanfgfX7Yb4UwjqNTUbK00PFT673GH1ub56NN7WtFf0VR9Y0A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768582469; c=relaxed/simple; bh=AgWf6hPAtL4GliApjS2EmEaZMLApvSCfTMtAOCyeuvI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=A+0J/9NiSB1UX0wIDCskPvJtyd2C0FvXIqYMuXJ19BmM5Evyjqh3Eo/ZuZGO8EASMUDYHV2M6Fm3z3zFuHFDxfT/Rp/BiAvfMfRvVO3b+Hz13v109u3UgO3wbSPJ8sARVYd571VK8ioWx38mqN0Q+WTXTXaUKRsMJXpxYLahBlM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BKf01sPk; 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="BKf01sPk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2095C116C6; Fri, 16 Jan 2026 16:54:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768582468; bh=AgWf6hPAtL4GliApjS2EmEaZMLApvSCfTMtAOCyeuvI=; h=From:To:Cc:Subject:Date:From; b=BKf01sPkBRzCsFEmg4ZVDfpmZ90mayC3ZU/FN+ZHAo23vyeGtT+oXnjZyugbGuq74 FYKbltjY4O1OLBf2usHtyXNgg7hw6959Ax0Ue9Vz0pIKxmeSxV7l6eObGfrjVtXk9x 66r8Z0xoQo+DyIPpSDyqLgRQDiPuP2Ony+VxR5L2XjBO7tuuqUTT5njMafIOjTEn/u 8GCsJkk9Nm4+ey5dbbS3DGbC9Mr+2iyqzi+44UfU4bL1bhG/hK2M5i9Ai7qMherKUq s1TiafCUSp5IqGC77jGfCGzpOdbeB+QxJ7qQRplDkh92leWgohrPGmUln2kY1vIOQ4 c154X1C7YSDrw== From: Pratyush Yadav To: Andrew Morton , Alexander Graf , Mike Rapoport , Pasha Tatashin , Pratyush Yadav Cc: kexec@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Samiullah Khawaja , David Matlack , Jason Miu Subject: [PATCH] kho: print which scratch buffer failed to be reserved Date: Fri, 16 Jan 2026 16:54:11 +0000 Message-ID: <20260116165416.1262531-1-pratyush@kernel.org> X-Mailer: git-send-email 2.52.0.457.g6b5491de43-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Pratyush Yadav (Google)" When scratch area fails to reserve, KHO prints a message indicating that. But it doesn't say which scratch failed to allocate. This can be useful information for debugging. Even more so when the failure is hard to reproduce. Along with the current message, also print which exact scratch area failed to be reserved. Signed-off-by: Pratyush Yadav (Google) Reviewed-by: Mike Rapoport (Microsoft) Reviewed-by: Pasha Tatashin Reviewed-by: Samiullah Khawaja Tested-by: Samiullah Khawaja --- kernel/liveupdate/kexec_handover.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_h= andover.c index 49bf2cecab12..636bd96780ae 100644 --- a/kernel/liveupdate/kexec_handover.c +++ b/kernel/liveupdate/kexec_handover.c @@ -651,8 +651,10 @@ static void __init kho_reserve_scratch(void) kho_scratch_cnt =3D num_online_nodes() + 2; size =3D kho_scratch_cnt * sizeof(*kho_scratch); kho_scratch =3D memblock_alloc(size, PAGE_SIZE); - if (!kho_scratch) + if (!kho_scratch) { + pr_err("Failed to reserve scratch array\n"); goto err_disable_kho; + } =20 /* * reserve scratch area in low memory for lowmem allocations in the @@ -661,8 +663,10 @@ static void __init kho_reserve_scratch(void) size =3D scratch_size_lowmem; addr =3D memblock_phys_alloc_range(size, CMA_MIN_ALIGNMENT_BYTES, 0, ARCH_LOW_ADDRESS_LIMIT); - if (!addr) + if (!addr) { + pr_err("Failed to reserve lowmem scratch buffer\n"); goto err_free_scratch_desc; + } =20 kho_scratch[i].addr =3D addr; kho_scratch[i].size =3D size; @@ -671,8 +675,10 @@ static void __init kho_reserve_scratch(void) /* reserve large contiguous area for allocations without nid */ size =3D scratch_size_global; addr =3D memblock_phys_alloc(size, CMA_MIN_ALIGNMENT_BYTES); - if (!addr) + if (!addr) { + pr_err("Failed to reserve global scratch buffer\n"); goto err_free_scratch_areas; + } =20 kho_scratch[i].addr =3D addr; kho_scratch[i].size =3D size; @@ -683,8 +689,10 @@ static void __init kho_reserve_scratch(void) addr =3D memblock_alloc_range_nid(size, CMA_MIN_ALIGNMENT_BYTES, 0, MEMBLOCK_ALLOC_ACCESSIBLE, nid, true); - if (!addr) + if (!addr) { + pr_err("Failed to reserve nid %d scratch buffer\n", nid); goto err_free_scratch_areas; + } =20 kho_scratch[i].addr =3D addr; kho_scratch[i].size =3D size; base-commit: c37fac0551448c68e36f14782acaf662c7a1775e --=20 2.52.0.457.g6b5491de43-goog