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 E231F2E2EF9 for ; Thu, 22 Jan 2026 23:21:14 +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=1769124075; cv=none; b=eQmUBl8a2VECquE82GPA6rNgEpO5kfcpkLoitaI88Fl+Gn8hJ8r3rh3N9ylzpkn/Y4dnb5cy+9L/lA0thkBd7djegqwkilTcXVvLb/zv/GGV6aXssjbM6wWL2ObS8e9zfayOeUDLqqn6l2ijQ7ObXLypUD0AncFCg/IGwyLJgdE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769124075; c=relaxed/simple; bh=FQSbPcWqMsCprYFwJmBz3VE+4rqivk3gkSSozBLvfkI=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=apM6QDIeyN5ZUrb/XwquXKCuVKz9kJzzYz9HE4/Gh8V4p8U3x4DLonYzTcrFa84p5FHmI/5ZmyFBiPw5gx5hu5I9LfQtikP1dWEx2asyJbEJMWbSSz6e2aZMK908NmI0iKKmrU0z6PAv+KPrxUbweWmA/RDtPcaNvlNt6lf+vWA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=EDLiiCYl; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="EDLiiCYl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46D9EC116C6; Thu, 22 Jan 2026 23:21:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1769124073; bh=FQSbPcWqMsCprYFwJmBz3VE+4rqivk3gkSSozBLvfkI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=EDLiiCYlAOXiX2hksK+ejbN30bffeiS9x2mgFIdx/DnZKX7QrEZGQ69DKgTiRWOGh RsXKpcqtgdEgrWVvBsn2b3xRnJyaXy987VYsCb6uoR63/DBiWd93QaDoRlvb7AIVBC pTMdXz9lwP3LI6MfPe+taT8DT9kUK/oEZhA7O7JI= Date: Thu, 22 Jan 2026 15:21:12 -0800 From: Andrew Morton To: Evangelos Petrongonas Cc: Mike Rapoport , Pasha Tatashin , Pratyush Yadav , "Alexander Graf" , Jason Miu , , , , Subject: Re: [PATCH v2] kho: skip memoryless NUMA nodes when reserving scratch areas Message-Id: <20260122152112.1a8be8e7bdab72631234cd69@linux-foundation.org> In-Reply-To: <20260120175913.34368-1-epetron@amazon.de> References: <20260120175913.34368-1-epetron@amazon.de> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 20 Jan 2026 17:59:11 +0000 Evangelos Petrongonas wrote: > kho_reserve_scratch() iterates over all online NUMA nodes to allocate > per-node scratch memory. On systems with memoryless NUMA nodes (nodes > that have CPUs but no memory), memblock_alloc_range_nid() fails because > there is no memory available on that node. This causes KHO initialization > to fail and kho_enable to be set to false. > > Some ARM64 systems have NUMA topologies where certain nodes contain only > CPUs without any associated memory. These configurations are valid and > should not prevent KHO from functioning. > > Fix this by only counting nodes that have memory (N_MEMORY state) and > skip memoryless nodes in the per-node scratch allocation loop. > So kho is unusable on such machines. Should we backport this? I'm thinking Fixes: 3dc92c311498 ("kexec: add Kexec HandOver (KHO) generation helpers").