* [PATCH v2] mm/Kconfig: make MEMORY_FAILURE select MIGRATION
@ 2026-08-13 13:49 Xie Yuanbin
2026-08-13 13:58 ` Lorenzo Stoakes (ARM)
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Xie Yuanbin @ 2026-08-13 13:49 UTC (permalink / raw)
To: akpm, david, linmiaohe, ziy, matthew.brost, joshua.hahnjy,
rakie.kim, byungchul, ying.huang, apopple, nao.horiguchi, ljs,
liam, vbabka, rppt, surenb, mhocko, gourry, tony.luck, bp
Cc: linux-mm, linux-kernel, liaohua4, lilinjie8, Xie Yuanbin
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 <rppt@kernel.org>
Cc: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Cc: David Hildenbrand (Arm) <david@kernel.org>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Xie Yuanbin <xieyuanbin1@huawei.com>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] mm/Kconfig: make MEMORY_FAILURE select MIGRATION
2026-08-13 13:49 [PATCH v2] mm/Kconfig: make MEMORY_FAILURE select MIGRATION Xie Yuanbin
@ 2026-08-13 13:58 ` Lorenzo Stoakes (ARM)
2026-08-13 14:10 ` Mike Rapoport
2026-08-13 14:22 ` Zi Yan
2 siblings, 0 replies; 4+ messages in thread
From: Lorenzo Stoakes (ARM) @ 2026-08-13 13:58 UTC (permalink / raw)
To: Xie Yuanbin
Cc: akpm, david, linmiaohe, ziy, matthew.brost, joshua.hahnjy,
rakie.kim, byungchul, ying.huang, apopple, nao.horiguchi, liam,
vbabka, rppt, surenb, mhocko, gourry, tony.luck, bp, linux-mm,
linux-kernel, liaohua4, lilinjie8
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 <rppt@kernel.org>
> Cc: Lorenzo Stoakes (ARM) <ljs@kernel.org>
> Cc: David Hildenbrand (Arm) <david@kernel.org>
> Cc: Miaohe Lin <linmiaohe@huawei.com>
> Signed-off-by: Xie Yuanbin <xieyuanbin1@huawei.com>
LGTM so:
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
> ---
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] mm/Kconfig: make MEMORY_FAILURE select MIGRATION
2026-08-13 13:49 [PATCH v2] mm/Kconfig: make MEMORY_FAILURE select MIGRATION Xie Yuanbin
2026-08-13 13:58 ` Lorenzo Stoakes (ARM)
@ 2026-08-13 14:10 ` Mike Rapoport
2026-08-13 14:22 ` Zi Yan
2 siblings, 0 replies; 4+ messages in thread
From: Mike Rapoport @ 2026-08-13 14:10 UTC (permalink / raw)
To: Xie Yuanbin
Cc: akpm, david, linmiaohe, ziy, matthew.brost, joshua.hahnjy,
rakie.kim, byungchul, ying.huang, apopple, nao.horiguchi, ljs,
liam, vbabka, surenb, mhocko, gourry, tony.luck, bp, linux-mm,
linux-kernel, liaohua4, lilinjie8
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 <rppt@kernel.org>
> Cc: Lorenzo Stoakes (ARM) <ljs@kernel.org>
> Cc: David Hildenbrand (Arm) <david@kernel.org>
> Cc: Miaohe Lin <linmiaohe@huawei.com>
> Signed-off-by: Xie Yuanbin <xieyuanbin1@huawei.com>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
> ---
> 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
>
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] mm/Kconfig: make MEMORY_FAILURE select MIGRATION
2026-08-13 13:49 [PATCH v2] mm/Kconfig: make MEMORY_FAILURE select MIGRATION Xie Yuanbin
2026-08-13 13:58 ` Lorenzo Stoakes (ARM)
2026-08-13 14:10 ` Mike Rapoport
@ 2026-08-13 14:22 ` Zi Yan
2 siblings, 0 replies; 4+ messages in thread
From: Zi Yan @ 2026-08-13 14:22 UTC (permalink / raw)
To: Xie Yuanbin, akpm, david, linmiaohe, matthew.brost, joshua.hahnjy,
rakie.kim, byungchul, ying.huang, apopple, nao.horiguchi, ljs,
liam, vbabka, rppt, surenb, mhocko, gourry, tony.luck, bp
Cc: linux-mm, linux-kernel, liaohua4, lilinjie8
On Thu Aug 13, 2026 at 9:49 AM EDT, 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 <rppt@kernel.org>
> Cc: Lorenzo Stoakes (ARM) <ljs@kernel.org>
> Cc: David Hildenbrand (Arm) <david@kernel.org>
> Cc: Miaohe Lin <linmiaohe@huawei.com>
> Signed-off-by: Xie Yuanbin <xieyuanbin1@huawei.com>
> ---
> 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(+)
>
Make sense to me.
Acked-by: Zi Yan <ziy@nvidia.com>
--
Best Regards,
Yan, Zi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-08-13 14:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-13 13:49 [PATCH v2] mm/Kconfig: make MEMORY_FAILURE select MIGRATION Xie Yuanbin
2026-08-13 13:58 ` Lorenzo Stoakes (ARM)
2026-08-13 14:10 ` Mike Rapoport
2026-08-13 14:22 ` Zi Yan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox