Re: [PATCH v2] mm/Kconfig: make MEMORY_FAILURE select MIGRATION
"Lorenzo Stoakes (ARM)" <[email protected]>
| Newsgroups | org.kvack.linux-mm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <an3NlTPC_TxuPrKu@lucifer> |
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 <[email protected]> > Cc: Lorenzo Stoakes (ARM) <[email protected]> > Cc: David Hildenbrand (Arm) <[email protected]> > Cc: Miaohe Lin <[email protected]> > Signed-off-by: Xie Yuanbin <[email protected]> LGTM so: Reviewed-by: Lorenzo Stoakes (ARM) <[email protected]> > --- > 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/[email protected] > 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