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 4E87C481ABB for ; Thu, 13 Aug 2026 14:10:57 +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=1786630259; cv=none; b=Xw7owM4zcJp5VvCc9iMIXUHSk6DcwJlj78A/MeNLwTbyHKlvoePYWGdqXLZvNTxm74liVy+oLxf7dB2Gm7bPDBZhhsWqdDy7swqOQF4y3wKv49oTVo0aueY6QeAhDa09z611G0ZwKQyn1QC6FrwxgoTktE0AJHh7zInqHfypdvI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786630259; c=relaxed/simple; bh=cCnXW52XYdcoLDbks/Q0/0UpgHj+4lednmcV9KXe2cw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CoTFPs4ZT7D3feQpt4ebTvJj5LcbbfDTYpkpOemXHyFHeSIJYkEXBbYDf2q+SFbos4VC46GkG+uvHKK5KdLVdaQqM5MrgRB5yWgnyfYxwR/IT/rdoz3kYSa2Nfb5Z4tKLUOXOkvyA31FAO751HGF7q4BAnBlmkEzC0k+ExlHmC0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ee49KQAt; 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="ee49KQAt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB25C1F000E9; Thu, 13 Aug 2026 14:10:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786630257; bh=W7c3IxzjZ1zVUumVwqgmmdKFeZT6O1JUGmcuJI+wfq0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=ee49KQAtsE++notyN1nLPwO0jpLIS+PyvCcTGaH/2F0IF0oOKRDN+WFM27vwkNTUq NDK5NITnltajeiXaM7rMwzdQWt1UPNBkUHKKOzVpRX66CvNrBeIQcTJjDF/hmxQfM/ S573gzHgkXvXzBX2keOh3kzTnzWgq7iOhFcGVO1LNhO4ywK1+qh+isUa/VIoDvjWFf zmNoPKJFIbRJ9awXVO8ThzlmOA2f7Wsl0CDxF64yXxqd4O6gNLJZhJITPEdXo11+87 BTUIJp//+24Y8e69zElxFTAkdofu10esk0uuMZztALuITcEKw7/GOWXNcWTMxojxYC RrIMJa595Y8lg== Date: Thu, 13 Aug 2026 17:10:45 +0300 From: Mike Rapoport 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, ljs@kernel.org, liam@infradead.org, vbabka@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 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 > -- > 2.55.0 > -- Sincerely yours, Mike.