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 A5DFC33DEC0 for ; Wed, 12 Aug 2026 13:32:24 +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=1786541546; cv=none; b=QflagLS1Ob9ibWtvJMLRMhO9Mwdjt8uljD17g7rec3fc6Q95Z8qZXc/tGZybQn7UsST2KaumHAj4M8sku65DOFjgPUOEG92SPgvY+XPjtyNRoIMoJuoaBPjbejIfFwJGl+ihljbCfwQDbpqNngVWJ2FP9BAoKLeJDBa8qYlA08o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786541546; c=relaxed/simple; bh=wh5gkdYqM9KunNm57rHD6qoBslbejS6yUblbmKlt9tY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XCYXo/IfFToCTop5Ttcep0yB4wTLcF4nxuix4f56XzwGj64D6bBKf931N5ccxaVrMUXHprfQXpyg5O3xesdLsaEcQeCiRsOsdY7YOBbuUFK5TGD0KEpWxfrZFPKWE0c/qum9B+V4ERyogwyax9d6Xp0y9Qznhsk7cjCVaLb0MZk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=O+fVn7I2; 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="O+fVn7I2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95FEC1F000E9; Wed, 12 Aug 2026 13:32:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786541544; bh=t4IWlDkd+77n3V2z4PXcxdrv9KIM4SUUHLTK6y+6PZs=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=O+fVn7I2aaHjOzHULCyhdWUyayJ+FUZbi+ggmMtF/iqbnxhrkG2XMe6O9Hf51BgtG wQZJ/3mUUb9AZ7YNr0eBvAWfArvP1xh3/SHtcHontQsjajOpvFhSrPilhNPLGFUKsX MJGZ5NS1bA6GPF7iVkiFItUgkgF2+qch+zrIubKsDIOIRkbvNPv+nXbn++7G4z9/bI 96Pk9ET8aMlcd2GvploYKDJkaM3XBq/1WNt13AXTyJQGCi1cDFOXTATLQBzRepfTUt ZSvhnbxRiUOE4gqwrVmrtZw0Og/9uNcf2oZ8sDJAyywF+TRc9YLwCzjmgG9TZcpCka FRyjCGm6cpGGg== Date: Wed, 12 Aug 2026 16:32:12 +0300 From: Mike Rapoport To: "Lorenzo Stoakes (ARM)" 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 11:55:03AM +0100, Lorenzo Stoakes (ARM) wrote: > 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. Think small systems ;-P > 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 -- Sincerely yours, Mike.