From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2AF691DE2C9 for ; Tue, 30 Dec 2025 16:27:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767112032; cv=none; b=mlY801IEnG6aAsU+w8V3Z0FmP8UxAZGF1D2Jg/doZET57t/5levJtpNKyoshzPbfIGmuwn32SEDcCCHzPL0Hzj0Uv86+LcCTLADzwSIkf35BiESIYSqRllCXt2dQdLQrpIAxb/hcwPXSb6n4u9q7LeCcOqmgGFGq31XeTkOYONk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767112032; c=relaxed/simple; bh=URTkQfEAZsZH5uYz347syQqM6OdY1oUoieji2FfUxl8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IOCIDsaTN2sCfCHFbV+0Fpdp95I68KcPgOd1G5+wJZ3Oelxe/FoED4qkdwjAz9GFFWbvD/V00fQxoweX7oJQ1AOhOO/D/2jfH0OlEORE2gqawcnH6BsbhobY26epv7zEHXZRQIjwnNOKy8IKbHNTMG+mY34rz5NBS7M88Z97ryk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nJFe4Uey; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nJFe4Uey" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB010C19421; Tue, 30 Dec 2025 16:27:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1767112031; bh=URTkQfEAZsZH5uYz347syQqM6OdY1oUoieji2FfUxl8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nJFe4UeyWaKz9zZyFi8M/Yl+ti0cC3DNxJmjnyVILaLigSgcAWjL8c1z9/GRVLeg+ KZ53Fb9hyXY9X8B4D4oq9cfhoPbHE6j6+UnCLGPZGmog29rqEGZdXHartFEUbkbP6c Hq+A4VymM2CId3nuCPUst9T+/SdYG7s4dO5p3zKgL4Vojbt4N3hrv37CiWXplVVDFo JwLMQfLGxq+H5HjIp2z/mYIoGmdyuMCe2Au9ISc+X1FcVN3Ls3MHz7RhctN4ZDPCD6 yL8mTOaZDUe2CV8+esu8STEotLp4kP0s9FdYSHzDiXPYc862olBt1Hid09o2F33bfg jUiE0Oq3Az5cg== Date: Tue, 30 Dec 2025 18:27:06 +0200 From: Mike Rapoport To: Pasha Tatashin Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, pratyush@kernel.org Subject: Re: [PATCH v3] liveupdate: separate memfd support into LIVEUPDATE_MEMFD Message-ID: References: <20251230161402.1542099-1-pasha.tatashin@soleen.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: <20251230161402.1542099-1-pasha.tatashin@soleen.com> On Tue, Dec 30, 2025 at 11:14:02AM -0500, Pasha Tatashin wrote: > Decouple memfd preservation support from the core Live Update > Orchestrator configuration. > > Previously, enabling CONFIG_LIVEUPDATE forced a dependency on > CONFIG_SHMEM and unconditionally compiled memfd_luo.o. However, Live > Update may be used for purposes that do not require memfd-backed memory > preservation. > > Introduce CONFIG_LIVEUPDATE_MEMFD to gate memfd_luo.o. This moves the > SHMEM and MEMFD_CREATE dependencies to the specific feature that needs > them, allowing the base LIVEUPDATE option to be selected independently > of shared memory support. > > Signed-off-by: Pasha Tatashin > Reviewed-by: Pratyush Yadav Reviewed-by: Mike Rapoport (Microsoft) > --- > Changes v3 > - Addressed Mike's suggestion: added default LIVEUPDATE, and removed > config from selftests. > > kernel/liveupdate/Kconfig | 17 ++++++++++++++++- > mm/Makefile | 2 +- > 2 files changed, 17 insertions(+), 2 deletions(-) > > diff --git a/kernel/liveupdate/Kconfig b/kernel/liveupdate/Kconfig > index d2aeaf13c3ac..1a8513f16ef7 100644 > --- a/kernel/liveupdate/Kconfig > +++ b/kernel/liveupdate/Kconfig > @@ -54,7 +54,6 @@ config KEXEC_HANDOVER_ENABLE_DEFAULT > config LIVEUPDATE > bool "Live Update Orchestrator" > depends on KEXEC_HANDOVER > - depends on SHMEM > help > Enable the Live Update Orchestrator. Live Update is a mechanism, > typically based on kexec, that allows the kernel to be updated > @@ -73,4 +72,20 @@ config LIVEUPDATE > > If unsure, say N. > > +config LIVEUPDATE_MEMFD > + bool "Live update support for memfd" > + depends on LIVEUPDATE > + depends on MEMFD_CREATE > + depends on SHMEM > + default LIVEUPDATE > + help > + Enable live update support for memfd regions. This allows preserving > + memfd-backed memory across kernel live updates. > + > + This can be used to back VM memory with memfds, allowing the guest > + memory to persist, or for other user workloads needing to preserve > + pages. > + > + If unsure, say N. > + > endmenu > diff --git a/mm/Makefile b/mm/Makefile > index 9175f8cc6565..798f04233d71 100644 > --- a/mm/Makefile > +++ b/mm/Makefile > @@ -100,7 +100,7 @@ obj-$(CONFIG_NUMA) += memory-tiers.o > obj-$(CONFIG_DEVICE_MIGRATION) += migrate_device.o > obj-$(CONFIG_TRANSPARENT_HUGEPAGE) += huge_memory.o khugepaged.o > obj-$(CONFIG_PAGE_COUNTER) += page_counter.o > -obj-$(CONFIG_LIVEUPDATE) += memfd_luo.o > +obj-$(CONFIG_LIVEUPDATE_MEMFD) += memfd_luo.o > obj-$(CONFIG_MEMCG_V1) += memcontrol-v1.o > obj-$(CONFIG_MEMCG) += memcontrol.o vmpressure.o > ifdef CONFIG_SWAP > -- > 2.52.0.351.gbe84eed79e-goog > -- Sincerely yours, Mike.