From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) (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 F1A61259CAF for ; Mon, 12 Jan 2026 14:24:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768227851; cv=none; b=SUgbtoF9AjOkAoXjDIM6U0QFvnw16SKAQyJXh3gsbL/5c7TmML0BiRGoLfbJXXWXGLeLmRIsg9Dsd13l86BG1hQK4lKmV4NR+8FjQw/ju89kCwhnbuhlp8ibJQh2h0uf1RUFktKm/SeAN488/NaesBV8IHWEtwxByUAGdyB+6xQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768227851; c=relaxed/simple; bh=5xkaxrEQleLpGwqxNUP7JkwwF4YVlsGsAKXcsyVt0DM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=s0MJW8x+BpKr611E9VFY8GU/kCb/0MxRso/kgwVj9I1Yta0VjFSn7Ihvkq+L/kVIW3SqudyyEYUWMkDnFvkDqUyJyDQfjQx9F6vsjDuWjCjHOQ1V28dx7gEfpMrhQIxBPZ5d5tgV45sDyaAQYiRGyfOnAaaRu99L7rePyRCyI7A= 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=idNlEIMF; arc=none smtp.client-ip=209.85.222.182 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="idNlEIMF" Received: by mail-qk1-f182.google.com with SMTP id af79cd13be357-8b2148ca40eso934667985a.1 for ; Mon, 12 Jan 2026 06:24:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1768227849; x=1768832649; 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=KUpRNxQojbrCXQgZvT64NRnUmgfWoa2X68MY1dWZwSQ=; b=idNlEIMFZjh5j7Jk3AlIzqFVMxn4wGwD8wjg21IkDaU6zvXW0f3RSawgPFdQqt7TGI VgbqGqnKuq62hWcDTX3nEvUYfQVztKIMrJ6gd2la/J719ZTWBu39Fbn3a1gkTjXBn4QJ fvfLW7dqgKiVTEVOnzWtTGKhfplE8NRMlaxbtGVCGekFHR3Gp4SJ0VujMCMET8cmLe0S gWsf1UxdBk7i+Q7ZJ0+r1AHvfKcXm/GNMoXihaSUsSh3abVS1hQAl1tRNL1CleX5LLcv Qi4fM9FqEWxemW0qGWrntjMYESB76DwQNAGSBmiJlJsTft00Vu4D1mQd0vdX6LcCMTt6 TRaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768227849; x=1768832649; 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=KUpRNxQojbrCXQgZvT64NRnUmgfWoa2X68MY1dWZwSQ=; b=QY3rOQkjD3U8wA1j0/XOtaYTKaGTDF+Ff84r4L4d8gEOJXPgvFcC3UY7eEzyxGNhPc 1TgSFoBuCELORGsBPqR5K0KRomRBC5gxVJ3q/3C4LzeJ4XuErSj1umpm5D9dFiheQPar 3AKZR0tjb/n1CnsDHdRPsibehSq9LtKrRAdtTUc9EOekak8u1Vzb6KFW//Ck5Rhe+r5w WJBqAE1+2wBPTU9FHRGtDsLx0KMHWSDZnjjnvK6rq3R9Frde565lvwtlrt6MXQC/CUot FLakD6ExeJHY+oAjqsfJA8vFBfrBsDLdmOpH1sN1mRGPx8kPyA395K4nL9Q7cGyufN+r KtMw== X-Forwarded-Encrypted: i=1; AJvYcCVHVjo7MjN/zIyTz5JQgIcq7q9CuYXJbSLMxj+RnoO+RzrAKEpcYnuj+43JjPP5VEXyB58Y86f2W55yB9Y=@vger.kernel.org X-Gm-Message-State: AOJu0YzoGdemyIUrDJ+YmZxgQlElpjS6Id41DPIRyFqdnK0OrdRb2bdL bYIHbNkdjzJf3z3zel6OaR56+fWrX7FDDuXdK+ZylpuocAK+IbpsB7tE47G/PrTeiIg= X-Gm-Gg: AY/fxX5a9Clr4YV+s/WEFNZme85/zeYQZIzHiHobMFLR9FTjVZbXhi3gqPSTi6tTnmd 7QS2vEYxceIQIkZrI8e+ZAKr1isCBIeAfsfkpdZk91WJhWCA33U+vFkDdTzt5C74R7FuqXuBpoo Sarvw+MV+gnbzrr/AW7v2Nkzz6Td8jP9G8dYAK0w7uF2Ocs60p/fdMRvcE3O+bqj2CHY5WnzfUd 1gi1/whmh3za+BmbBvbNLI9RxxYkXKXsaAdBROPoXhR0aWTrzl0imPsVonCreE4Na15VW9WJhgz ILfO96xKxrS5pWE0jRYWZzSEV6WNlo7zdGyG+siuxEr2QHffwli/8E/tp3VHWZTpyM/NcQVTaEu T7vXKc7DYqB0p2ZiQ3qL9PZWtOTA8OQlXW8yi65i/UZn/CMfuW3fPnesQRQahLZiqZL7qTF+hi3 dicd6JCvUjXNBkQd8VioS4NoTM3e3P45evmxTSI+RPniERMrOdyEKpBd2u3WezRlf9+MKxBg== X-Google-Smtp-Source: AGHT+IHAWBHy+dg+riyrEfJ+OU+PeLj8yeiOx2OVhwYE1GsKUe4fVZkvq5w3wunyjI1ecPg+bhn+jQ== X-Received: by 2002:a05:620a:7088:b0:8b2:efb6:5d07 with SMTP id af79cd13be357-8c3893f2390mr2358703385a.48.1768227848740; Mon, 12 Jan 2026 06:24:08 -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 af79cd13be357-8c37f4ccdf8sm1546816385a.23.2026.01.12.06.24.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jan 2026 06:24:08 -0800 (PST) Date: Mon, 12 Jan 2026 09:23:35 -0500 From: Gregory Price To: Hannes Reinecke Cc: "David Hildenbrand (Red Hat)" , 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, mhocko@suse.com Subject: Re: [RFC PATCH] memory,memory_hotplug: allow restricting memory blocks to zone movable Message-ID: References: <9575e042-39f4-4f01-80db-34aaaa9312e6@kernel.org> <616f97b7-24e0-4134-a08d-5abaf07a8b09@kernel.org> <20baab84-c8b0-4c46-a550-21b26b975d07@suse.de> <65c246bc-fb10-4cef-8163-3a55bd96f326@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: On Mon, Jan 12, 2026 at 08:28:29AM +0100, Hannes Reinecke wrote: > On 1/9/26 17:41, Gregory Price wrote: > > On Thu, Jan 08, 2026 at 03:16:24PM +0100, David Hildenbrand (Red Hat) wrote: > > > On 1/8/26 08:31, Hannes Reinecke wrote: > > > > On 1/6/26 21:22, David Hildenbrand (Red Hat) wrote: > > > > > On 1/6/26 20:59, Gregory Price wrote: > > > > > > > I'm starting to think this issue is actually the result of bad patterns > > in the cxl driver - namely using dax as a path to hotplug sysram. > > > > I suppose either we need a `cxl/dax_region/remove` that handles the > > whole operation in one go, or > > > > we want `cxl/region/commit` to handle hot(un)plug as a single action. > > > > tl;dr: Split the dax use case from the sysram use case, and make a > > cxl sysram driver directly manage hotplug rather than use dax. > > > > Well ... not sure. > We are doing fine even currently during boot up; we can align policies > and everything to ensure the system comes up with the 'correct' setting > Things start to get iffy if one is reconfiguring memory to move from > daxdev to system ram and vice versa. Hang tight, i'll post an RFC this morning that shows the idea in code. region0/memctl/hotplug - if not already hotplugged, creates the memory blocks unless MHP auto-online or new build config set, do not auto-online region0/memctl/hotunplug - remove memory and hotunplug the blocks Done in a single action region0/memctl/state - accepts [online, online_normal, offline] does the action on the entire memory region under the hotplug lock online - ZONE_MOVABLE online_normal - ZONE_NORMAL I also added the memory event callback to prevent someone from onlining in zone normal if the last online action was 'online'. I've tested this on QEMU and it works fine. ~Gregory