From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 94ECE346E53 for ; Wed, 7 Jan 2026 16:01:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767801684; cv=none; b=Za8Y/0fgnrlK014YLCt6t3s/EzQVXNQZJTCv+TCuktWg3lOiz32CcOYhxUb7PGzMZ2PHHBaPqPxleKGc4+lbF95NHj3LWvx8Jp5eJ8KZ7bPiw0PTO7OvEMJqNhkC6a/eWlmvoy9KxdIMMNWrR8LVc1gEgSsBlsYdjGyRCckGyds= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767801684; c=relaxed/simple; bh=9zJwZddiR18ZUqbcQo6xl00cuBhs2/TG4GgIayojWmE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ULFUTuGGRBlsshS7yS9U7GOB0rGEf6z9//VpxLi5M6cl26k03LCyjkxIAE0CpXFOVuwz+KNSUn9sSzO62x8UGwS3/gM5M7fnVbyd4yZMnCXGitND5X59eHxpao5bJPjabhU6PmnEUarOlk+B32zMSRP90w+xv8TWq7mtqg6TgbE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=StZOiZvP; arc=none smtp.client-ip=209.85.160.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="StZOiZvP" Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-4ee0ce50b95so8812391cf.0 for ; Wed, 07 Jan 2026 08:01:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1767801659; x=1768406459; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=E3+MM7tobpT8iFiKLyusxR6cK1SXJsQSVXCJN0L9E9M=; b=StZOiZvPa3nmoY3dyhhthbQTcAZscnT33qoHAx45NBIFePniOtMg1J3R0SvJ+BScd5 FkHujDZXbzExN2fsYCjaKeSZ7sDtaCUKAJVgi/3QQUhpdDQ1ChxtL+4szxNZngfTt5+7 MWkHwUFSdpRPnMzbtcBaIHyFuku6ZRqb4p7YUzN8cozpHrnn1uZdumv3bBYycn8xz0M7 4PeiDuZveI9pMQaStVFa9OQBx11NU4ELhbaC7r6z+9gmyh/IATQLKd6teY/xi0JJPvuZ P33VxFCuTh90kT5eNfcA3KYL+nhBnh2NPQvLJd/vW6GFOiQgcHMi05h1Ks0oBsXO+HRq A3Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767801659; x=1768406459; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E3+MM7tobpT8iFiKLyusxR6cK1SXJsQSVXCJN0L9E9M=; b=V2PaS2M64F6V3lRUsDKEbNtBqDCaPvUYO2kUHu949lJ4nTHW6OFUge11gyr2av1u5B 4KqBTx5IwuzdEm+V4UoXtqDdCM6bYq9ip6X8dVwU4qum3XbCi6aHbR9+aAgwwQsfveyW WdnelfiyW7fCfBgrxJZIVwZgqS2a6F7CuWI9GoeYh/4bjkYXrJqKnVxVaOL4lIzcVHMw hMf7qVXw8MwZnRuRUkgvLK5ftQZQhgrgpl55fTa42dstVhH+217If7QBf0sNIzzXHx2E HpVPtAKSJpV7kSF0Za3wACcOhB2S3Y7YiQzxbhGeYtsMKoLi2fNJUuMEf5H0h9M0u4aI N33Q== X-Forwarded-Encrypted: i=1; AJvYcCXUma6km055PMli2S1WY09+S9rJMSpY+P50Wnsnx7zfcpMs98nmWA5fyJLaXalSf3CAYZx/42p7Yfwx3Gs=@vger.kernel.org X-Gm-Message-State: AOJu0YyXl9BA4hLLHNe165OEKHsXe62mkc1G7m43SNtUMjJCKbUmEZuv 42amBprrr2h/war/9tKcWITN/EZy1zgGram4w7q1aimNaNdGZ1kelq7lyGNUbk1k9PA= X-Gm-Gg: AY/fxX5TyYXXwLs1ZdFVkbx9GeP0PjL8XE/gSZd4tq1T3p8L+lGo8pgMyT1QccX9bUp KNq+nU0gQD6GQSXXEctjNAIMNdFmPifzTSAqSolNj52zITgCt7rbR/n6Qf3pkY9inW6VwVshKg9 hbNEKp3Y3flJId8rQTjbFymAjMS0mnbXbzMhvz5QBMNRaFEmGIms9ijsXN5oRwVsIz3FgD+HRFm 0jw1ZSCIq3KAbxc0SUcN3pELzbH8LPT2MDzO0h3hYO4+vhbLPJLZFpRQ1BtjdRrSFdcX2YMaO7y zgCiuMGr5TDuFp/431Q8SHbxr6zbUVt3YnMsDKIYjKiqYo+cfi8Sg0W46PDQbpkyuZ2UrcVlZsh XRrIzXgoiHQ8olJFu70Z3o3/uyTQFw2LohelptkzH/mEnTdZEdnmvp9tqSMNM2nBYiSRgNzwpeA DsAbk80K8lJP0ummhtmhWFMoz+Iz4pAn2zPiZYdAcQ8Tij+Puz5oWTv975OU78GYZAT9Xusg== X-Google-Smtp-Source: AGHT+IFAe+h/qbJUDO3gQDsebQZ5B6ZQswuRD21Zlq6jITXPFCkVccHvnHqclWnOxjx79CDvaT4XpQ== X-Received: by 2002:a05:622a:54b:b0:4ed:3d24:9570 with SMTP id d75a77b69052e-4ffa852b431mr97724731cf.37.1767801657128; Wed, 07 Jan 2026 08:00:57 -0800 (PST) Received: from gourry-fedora-PF4VCD3F (pool-96-255-20-138.washdc.ftas.verizon.net. [96.255.20.138]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4ffb813ffb8sm9862841cf.20.2026.01.07.08.00.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jan 2026 08:00:55 -0800 (PST) Date: Wed, 7 Jan 2026 11:00:20 -0500 From: Gregory Price To: "David Hildenbrand (Red Hat)" Cc: Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, osalvador@suse.de, gregkh@linuxfoundation.org, rafael@kernel.org, dakr@kernel.org, akpm@linux-foundation.org, lorenzo.stoakes@oracle.com, Liam.Howlett@oracle.com, vbabka@suse.cz, rppt@kernel.org, surenb@google.com, hare@suse.de Subject: Re: [RFC PATCH] memory,memory_hotplug: allow restricting memory blocks to zone movable Message-ID: References: <20260105203611.4079743-1-gourry@gourry.net> <39533aa8-ca78-41a8-b005-9202ce53e3ae@kernel.org> 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: <39533aa8-ca78-41a8-b005-9202ce53e3ae@kernel.org> On Wed, Jan 07, 2026 at 04:09:34PM +0100, David Hildenbrand (Red Hat) wrote: > > Sure, I wouldn't push for more complexity just for the sake of a > > theoretical extensibility. And I have to admit I have't tried to a quick > > PoC to see how complex this could grow. I was hoping this could get into > > a simple mask for online types with default MMOP_ONLINE_KERNEL|MMOP_ONLINE_MOVABLE > > and special cases just choosing one of the two and zone_for_pfn_range > > checking for the compatibility with the requested online type. But I do > > appreciate there might be some obstacles on the way to achieve that. > > If we want to go down that path of failing onlining, we could likely do > without any core-MM changes: dax can simply register a memory notifier and > fail MEM_GOING_ONLINE of its memory with -EINVAL when it sees !ZONE_MOVABLE. > > That works, because online_pages() does the move_pfn_range_to_zone() before > calling MEM_GOING_ONLINE. > This would be clean, and we could add a switch in dax-kmem for something like hotunplug=true which limits zone eligibility to ZONE_MOVABLE. I can look at this next week or so. ~Gregory