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 D7860353A68 for ; Thu, 13 Aug 2026 13:59:19 +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=1786629561; cv=none; b=I+/ehIfQ/AiOus2auM+Vqzhh70hurkyB6G0fAXwnRYIgnZG55PbO9xEW3mSQtCy3sQHyddXuLxMxFGXBRaARJoWQ0ytl5O0XudPoJN+hPLzzkJo135+ztKCmGZeS/xtt8aw+EnE9R31iCS3dp5HllpWqcJrA8k9mllsugR+h9QY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786629561; c=relaxed/simple; bh=rvrH1lJzYyvwWBMCgDYDLhU8V/ZEv6X3w1eXLuYELLE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lMmVqpWeMebcynuiC20U5H8q94kLcvam30p8iscPCGQFFSCyON2TnIyZjjd3AAPUZU2Jp7/4ADHo1ntiDlxDZydUB19l8FCuFwun5H8zkQonavzotNIPAJzcddHn1wOsz6sFAGOCzXC2+vk5bycYOhzpXMUllissXk1lQUVaNJ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HlHm0Q8N; 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="HlHm0Q8N" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FAB11F000E9; Thu, 13 Aug 2026 13:59:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786629559; bh=5W7QCmr2rjHR1mmHHdNertquJLOjQ0otV7ASBvPjV2M=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=HlHm0Q8N1sQqbIqpAcHntha66NxayV4XTqDjh1eJyAYnirCYXCcnx17Sp0Ez4EAnD g1RYWvi5EIbk3Wq1kcqLhxuyaCvSc+keIMCsZEYkT0wCvc+ow0Vnc1csHk6OPCkPlG KD+hoYgAi7lG1olYg2qO+6oXk6S1KP63njMZRrmhmyVNhUZHUnYlBbOvGoI4wO/Jtn 3qNGE3P4lZUiraa23eyzA67s709Ah3VsNn2gy1oLANdW2Z4kRevvC9OJwhUC+zfDeg gLcxiPyaZRQ8jyN2nyJrXLSpGWgnl5aTR1MadQRM94Y2d/SVSapI79UKIswKCG/sS9 nQAlN4K8bvQ1w== Date: Thu, 13 Aug 2026 14:58:57 +0100 From: "Lorenzo Stoakes (ARM)" To: Xie Yuanbin Cc: akpm@linux-foundation.org, david@kernel.org, linmiaohe@huawei.com, ziy@nvidia.com, matthew.brost@intel.com, joshua.hahnjy@gmail.com, rakie.kim@sk.com, byungchul@sk.com, ying.huang@linux.alibaba.com, apopple@nvidia.com, nao.horiguchi@gmail.com, liam@infradead.org, vbabka@kernel.org, rppt@kernel.org, surenb@google.com, mhocko@suse.com, gourry@gourry.net, tony.luck@intel.com, bp@alien8.de, linux-mm@kvack.org, linux-kernel@vger.kernel.org, liaohua4@huawei.com, lilinjie8@huawei.com Subject: Re: [PATCH v2] mm/Kconfig: make MEMORY_FAILURE select MIGRATION Message-ID: References: <20260813134916.292733-1-xieyuanbin1@huawei.com> 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-Disposition: inline In-Reply-To: <20260813134916.292733-1-xieyuanbin1@huawei.com> On Thu, Aug 13, 2026 at 09:49:16PM +0800, Xie Yuanbin wrote: > For embedded devices, lacking support for NUMA, memory hotplug/hotremove, > CMA and huge pages is a quite common scenario. In this scenario, the > demand for contiguous physical memory allocation is very low. To reduce > the kernel image size, some devices disable the compaction. However, > their SoCs do support DDR ECC, meaning that memory-failure may be needed. > > Migration is very useful for soft_offline_page() in memory-failure, which > may be triggered by correctable memory errors. Most anonymous and > file-mapped faulty pages can be migrated to other healthy pages. > > Currently, MEMORY_FAILURE does not explicitly select MIGRATION. When > COMPACTION, MEMORY_HOTREMOVE, NUMA_MIGRATION and CMA are all disabled, > MEMORY_FAILURE can be enabled, but MIGRATION cannot be selected. > > Make MEMORY_FAILURE select MIGRATION to handle this situation. > > Suggested-by: Mike Rapoport > Cc: Lorenzo Stoakes (ARM) > Cc: David Hildenbrand (Arm) > Cc: Miaohe Lin > Signed-off-by: Xie Yuanbin LGTM so: Reviewed-by: Lorenzo Stoakes (ARM) > --- > By the way, as DRAM prices continue to rise, memory-failure becomes > more important, and we are trying to enable this feature on more devices. > > V1->V2: https://lore.kernel.org/20260812091644.224299-1-xieyuanbin1@huawei.com > Do not expose the MIGRATION config to users. > > mm/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/Kconfig b/mm/Kconfig > index 8a24c130d008..604c58199acb 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -767,6 +767,7 @@ config MEMORY_FAILURE > depends on ARCH_SUPPORTS_MEMORY_FAILURE > bool "Enable recovery from hardware memory errors" > select INTERVAL_TREE > + select MIGRATION > help > Enables code to recover from some memory failures on systems > with MCA recovery. This allows a system to continue running > -- > 2.55.0 > -- Cheers, Lorenzo