From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 37E3234F465 for ; Tue, 6 Jan 2026 19:49:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767728961; cv=none; b=qSTQFkGA1eB1Vdfi728KBtBxzjOogWIOs2qIDbhgEkMnnkCUBrqMpiy6YPvjYgqT1CLTE6Y9C2ellmBRdIYDsSuTOAaDTRxxx8b24PF5GCUSybYxmIWpPAA6WcMeLWSBTfCxjmiMuqBoksYDwlZhEWV5vQnvuXY0CTvdx1nVVtI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767728961; c=relaxed/simple; bh=47DUwnjeXcQNm+aM+uoOhngXJCHyZbF7Q6R4bRTfxLg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=d8zUAJLEtQmqXZBkpmPa9yY7wXG6R4tgnrNXhT9Fhc+lcViRBVVLt0r2+e73ryCJeUliWzkzqioRybiSkMa8Lb9bpJfsgnQrm8saXl5TpSDYRMVRM333aUxIm488fP/hhh0WdTEem5xjL0k82VWsWbYDReA1eaUgUMOMwWhvllQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=dD47O8it; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="dD47O8it" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-430fbb6012bso994340f8f.1 for ; Tue, 06 Jan 2026 11:49:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1767728957; x=1768333757; 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=rHkRaP2tx80Uh6Mi6taIl9DuPGNq0u3ufZRpaBi3H/g=; b=dD47O8it0ACUWudWy5gDP3j3WE2fjNU1Yxm9r2IUtJlzbzBzltQK++qBqLgIfaRunz 70dchZ2r8m6XWJ/PNRUcM1DOi2xhsstGU7a/gj5wMy3WPwNkbNZLSQk2uOI4eXzByc4V g3hialBjeH31V420g3lg0AoYrn/1k2PEfB43Ekec7M4Og/8R5+5bGZ/kuhJmTGgK66J1 hzYTZObgesa9v4nriA9a3JMQt76bFEQewUj27f39oCsyf23BdOVhwr14xwPZ73IP//wl QqoDXjd4iyPHY8C6/fZLYo0miW0I/8NFcL/U8zxjWGuKpd869S+45ZWcl6N0qIkC4ib1 Yhtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767728957; x=1768333757; 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=rHkRaP2tx80Uh6Mi6taIl9DuPGNq0u3ufZRpaBi3H/g=; b=oUzrnRQYqk06umx+KJgM/NVcZJrBqCLyVG8W3V2mP67F9NvEhX068sNebsnYnX88X/ CkJXqVX7X30iCJRPKsdObhOutR+9N3D1lF9GXj3ZVZta/QEJHJ8wVDTxyF2xeac40v9T NEfeh9NpS2Bpce4gzioe+FEC6TxdKBnwZNnSmwH6YmX2EQ/3ES8MVM1IJssPXm3t32xj cyQUJR4qHlbk14Bzi1zjJmMi/VXx8XZkn0ps1g0c6q+FOSU9Nkq1RK1iD8YKO4jN+Cyr Yp06VecRIyh4Re4gbf18C34ZQdtS7l1PKvxiS+cAgyjEKYENHJKqYErl6yw9z3e/nXP+ 1llw== X-Forwarded-Encrypted: i=1; AJvYcCXHrWLJqHPOR06cVshoQL4vnyxPR+7RJ/NgV6haTcKHxg8nbR8b3qr3zvj3/kz9yizRBDY2AsFsWb3q3Ew=@vger.kernel.org X-Gm-Message-State: AOJu0YzZJsXedWmU/Lf7FYvN5KsBaHoZasl6VKKeQ35S9I6K/JtAatkR OFgFSQ/8ID05hGfg5o/Ye+7qhgJCs3KZN2h9cTo2JVtmhYYCSNyiTGF1xz49mePycwM= X-Gm-Gg: AY/fxX6rsUfpMJ9PTJNWkh6AmlJ4yY6i1camq6Lesb1MsjF6PE6aeCWsSzmRsi/6Q4N 25Hsz+UZxA30LRi38EMAVOBDWHuxF0XDqlnCV+FXVmCq7VbzXri5nRnucNbWt4LE92fZWltoXMZ tcymnwIRmO9SMC3kA1B6DJLEuRZSfI22lhSfi8zbotL2VI6Lr6Rq6QsKoOwbOGiyTTY88g+eDhQ 4ifi6bzte2wcjDwZWPqph0RkvbQOxOhrJTNtPL8onnFK+5REIdY6znfGEdIws9Vg4wqeUIiI7ol /mKdDfPAhY/T8IZCB6e6K9uxnL02uZSRjM+gvgKoHeTD/b3bTVKaTpVfP7CBzevM276VBnUozH3 igjd7MuWvrHaLpD+3Uc95GXTB8eCcoVkM2PmY+hmfAfA6w4qu/k9wmI0ioqMmuPP+vV/YyC+auU YG6yoWRzxKloGTovbhvkRNZc85 X-Google-Smtp-Source: AGHT+IF4JLpTosJ+ky8JQbfIvRxievBhMEnNPfm14TESXhXn5qIqhxbBa4jTREutDNhaOuZNhuKI+w== X-Received: by 2002:a05:6000:290e:b0:430:f704:4da with SMTP id ffacd0b85a97d-432c37a74dfmr265600f8f.58.1767728957407; Tue, 06 Jan 2026 11:49:17 -0800 (PST) Received: from localhost (109-81-93-164.rct.o2.cz. [109.81.93.164]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd0e175csm6163158f8f.14.2026.01.06.11.49.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jan 2026 11:49:17 -0800 (PST) Date: Tue, 6 Jan 2026 20:49:16 +0100 From: Michal Hocko To: Gregory Price Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, david@redhat.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> 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 Tue 06-01-26 11:53:30, Gregory Price wrote: > On Tue, Jan 06, 2026 at 04:05:48PM +0100, Michal Hocko wrote: > > On Mon 05-01-26 15:36:11, Gregory Price wrote: > > > It was reported (LPC 2025) that userland services which monitor memory > > > blocks can cause hot-unplug to fail permanently. > > > > > > This can occur when drivers attempt to hot-remove memory in two phases > > > (offline, remove), while a userland service detects the memory offline > > > and re-onlines the memory into a zone which may prevent removal. > > > > Are there more details about this? > > The details are with Hannes, I was just recapping what was described in > his devmem talk at LPC ("To online or not online"). I know of policies to online newly added memory blocks but I am not aware of policies to re-online something that has been made offline. > > That being said, rather than movable_only, should we have a mask of > > online types supported for the mem block? > > > > I briefly considered this. I went with this for RFC-v1 since it's > fairly simple and because movable is really the only zone with hotplug > guarantees (any other zone makes no hotplug guarantees). > > It's also significantly more complex of a change for questionable value, > but if people see this as the way to go i'll happily pivot to that. 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. -- Michal Hocko SUSE Labs