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 5668A3B7B7D for ; Wed, 12 Aug 2026 10:55:25 +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=1786532126; cv=none; b=rMYP6yPPuOcvWZvx6xPB60o6VzGL1W/yqOAq4uI3ietJo7lnNyXfJCA7qZQEoDrL66Umj2UnguoN4UWi/5C85wzQm4jItEYZO1nAAa30FmAY9NbrlLr8oi0PRLps8SB1B29yN/t5guh7XEZYyzzd7F8cYK0Xvwq3QvV+P44J8Tw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786532126; c=relaxed/simple; bh=EBD9E9hYfVqp7BHhrCHhgsc3v9f3/O50ZRcMG1K5nis=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XNgMTZBZWtzWjSG2QM/kAdsD3ttul5MKEog2dnwi9XuPa1/KlOBe3M6yBPafJgn1PjuXT0Rxo6sopLwjct02AKQZqEIkuK7Y6LMehtYcQ69JLhGgPLKn1YLcw1H8EEn0xZUNFLsiSD6ddo1tzwmGFUe1IoU4ZF/c3/erLAftY7g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=n8nYPjTU; 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="n8nYPjTU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 891421F000E9; Wed, 12 Aug 2026 10:55:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786532124; bh=0fuyFHc5wlgCnwoU8B++ymoBOTLisMABJc8FzpoOvIo=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=n8nYPjTU4r/Nd5BTMnlHtCFatnQm9LWvS5aKvriT5WDtXSrov6/RjloLlQQd609BJ +G89DQh9ybFgt26PdxwGCGvYh7592kAEzLdiTh+sfsMUT11eXw0FZ472s3CR1zIgcG Uba5hjuzY3TzP4kC6eQYU7AUrBGYZ2T0O2di1ePKwMj090KwRprS8SBgMnrisIXZzf VML+x1stzh5yEq2PsKDzuTLUppGzWe6NpmaBiYsXAgSY32m26r3eJ2L7aMmoIk0+GT HkP9gazQTQYC/vi1R6za0hdZKOm3eBRZrN5AsnrpraXIhkJWIzxwlANPpWjYU7XeCh RtP7C0BAoA3aw== Date: Wed, 12 Aug 2026 11:55:03 +0100 From: "Lorenzo Stoakes (ARM)" To: Mike Rapoport Cc: Xie Yuanbin , 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, 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] mm/Kconfig: allow user to select MIGRATION if MEMORY_FAILURE is enabled Message-ID: References: <20260812091644.224299-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: On Wed, Aug 12, 2026 at 01:45:30PM +0300, Mike Rapoport wrote: > Hi, > > On Wed, Aug 12, 2026 at 05:16:44PM +0800, Xie Yuanbin wrote: > > Currently, memory-failure can be enabled without migration. However, > > migration cannot be selected by user when memory-failure is enabled. > > > > Migration is very useful for soft_offline_page(), which may be triggered > > by correctable memory errors. Most of the anonymous or file-mapping > > faulty pages can be migrated to other healthy pages. > > > > Allow user to select MIGRATION if MEMORY_FAILURE is enabled. > > Also, select MIGRATION by default if MEMORY_FAILURE is enabled. > > Do we want to make users decide if they need MIGRATION when MEMORY_FAILURE > is enabled? > > Just make MEMORY_FAILURE select MIGRATION. NO. Explain first why the hell one of the other options that selection migration can't be enabled. Changing configs just to support a weirdo no to compaction but yes to doing soft offline for debugging or whatever isn't really convincing unless a real world, sensible use case can be stated. The kernel isn't there to allow you to have broken configs. > > > Signed-off-by: Xie Yuanbin > > --- > > mm/Kconfig | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/mm/Kconfig b/mm/Kconfig > > index 8a24c130d008..b4c217383b51 100644 > > --- a/mm/Kconfig > > +++ b/mm/Kconfig > > @@ -682,7 +682,8 @@ config NUMA_MIGRATION > > demotion for memory tiering. > > > > config MIGRATION > > - bool > > + bool "Enable page migration" if MEMORY_FAILURE > > + default y if MEMORY_FAILURE > > depends on MMU > > > > config DEVICE_MIGRATION > > -- > > 2.55.0 > > > > -- > Sincerely yours, > Mike. -- Cheers, Lorenzo