From nobody Tue Sep 29 02:01:33 2026 Received: from canpmsgout04.his.huawei.com (canpmsgout04.his.huawei.com [113.46.200.219]) (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 86E2047F2FE for ; Thu, 13 Aug 2026 13:50:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.219 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786629061; cv=none; b=oAGWLGDNBKUIc3DuCB+PZtOWazXrE9tKIE+6KgA72K+VKf59cWjAUyY0oN40OjS98O/+BeEW0mg/w0FFnMih7k/LeoHPolTARnKY6y+2/oHLfYAug8pQ5O3eq3lFYp60rCP621nP0vPxpS1qHKNidF3xwBFdEnLHwTeiEbySnZs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786629061; c=relaxed/simple; bh=DhHHr/tqVTPvdLizOMGdoLKIL2g1/rZVMe9A0XayHc0=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=SCmhQ2U1AhGGafML11iVtBSAbeiNzEaZlKCJ8CBzS5Qp0I+MZ6sl5sg+GNzfvXu0AHDFKOIbgcBElz62w+U7Q5gw2ofRCboOIKzXETyITNHFBJzSdgOaEmMRd0tT143Cv2xmMIblO2jWCEqZY+/wW5mW6GDr0ivV9beSWn/2hQg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=brjdsDmG; arc=none smtp.client-ip=113.46.200.219 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="brjdsDmG" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=JunOKLTGGpF5Im1GoXsL5Z4YAQAt4lQ2GPUbcnRIMB4=; b=brjdsDmGZXlIZ+NTMUBUJcaglg7XNQPk4ZbzbF/kJDGVbzCfje0pas7V1hPsFJbzjWF8E/qu9 b02UuVdp76pw75CuOEK00psixuBSazZJDtxM99RhjkOlX7Af8pOe/tIb3+wMJp1D3NKbGxOjlHX fT5tLIqJhZs2QV/odJ0HqI0= Received: from mail.maildlp.com (unknown [172.19.163.104]) by canpmsgout04.his.huawei.com (SkyGuard) with ESMTPS id 4hLRLY2Swcz1prNF; Thu, 13 Aug 2026 21:40:05 +0800 (CST) Received: from kwepemj100009.china.huawei.com (unknown [7.202.194.3]) by mail.maildlp.com (Postfix) with ESMTPS id 2C3DF4057F; Thu, 13 Aug 2026 21:50:45 +0800 (CST) Received: from DESKTOP-A37P9LK.huawei.com (10.67.109.17) by kwepemj100009.china.huawei.com (7.202.194.3) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.36; Thu, 13 Aug 2026 21:50:44 +0800 From: Xie Yuanbin To: , , , , , , , , , , , , , , , , , , , CC: , , , , Xie Yuanbin Subject: [PATCH v2] mm/Kconfig: make MEMORY_FAILURE select MIGRATION Date: Thu, 13 Aug 2026 21:49:16 +0800 Message-ID: <20260813134916.292733-1-xieyuanbin1@huawei.com> X-Mailer: git-send-email 2.55.0 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 X-ClientProxiedBy: kwepems100001.china.huawei.com (7.221.188.238) To kwepemj100009.china.huawei.com (7.202.194.3) Content-Type: text/plain; charset="utf-8" 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 Acked-by: David Hildenbrand (Arm) Acked-by: Miaohe Lin Acked-by: Zi Yan Reviewed-by: Lorenzo Stoakes (ARM) Reviewed-by: Mike Rapoport (Microsoft) --- 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 --=20 2.55.0