From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E1D7606A32F for ; Sat, 28 Nov 2026 18:27:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=3RMBfune; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.a=rsa-sha256 header.s=google header.b=n9EHEAfC DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version:Cc :To:Subject:From:Message-ID:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Unsubscribe-Post:List-Owner; bh=tWonGarP/JSpfYSCREzqgbxCwkI6wgnwB8spvNKTl70=; b=3RMBfuneejnNDgUJUWrxH2BWch s8WyHnB7CCPmE8jrLuYdUwkM27fT2q3RWI5ixbGnNrM+J8gr4Ph4w3RbzLNyrV08BwOjH16uRZA1N ndlT6XUx/dS0MTC6Zscf7sBqXA619zNG8rh2SzOQ5AJEwDo/r2LkaItKaoo6jg/NIQI+O/wnUwSoo CvQgJ1KH2xs2ZBBrDohL/uexeRsqLABsrASZBuWPJZdW0K/rAtlLinNQFWDtXLbuOVg1A8NyBvcLD DTw4T53PmeOKW/VRO1W3lF44B8JGAfNH9yz8Ya/Ty+Vadh3XYmfCqerLV4nZt+tSuEGo/plck6ZzJ ft/TQr/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXN97-000000015uk-0doT; Sat, 28 Nov 2026 18:27:37 +0000 Received: from mail-yw1-x1132.google.com ([2607:f8b0:4864:20::1132]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXN94-000000015u6-0CdJ for kexec@lists.infradead.org; Sat, 28 Nov 2026 18:27:35 +0000 Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-8b5981c4834so12312237b3.2 for ; Sat, 28 Nov 2026 10:27:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; t=1795890452; x=1796495252; darn=lists.infradead.org; h=user-agent:content-disposition:content-type:mime-version:cc:to :subject:from:message-id:date:from:to:cc:subject:date:message-id :reply-to:content-type; bh=tWonGarP/JSpfYSCREzqgbxCwkI6wgnwB8spvNKTl70=; b=n9EHEAfCTeIM+07IGl+9TpoVFbhPdUEUa63h8PKZZVs4dZVNwuPCz0xjIoaMYiGKCh 9EI0pROwtfZITvqW5RqitFE7ozr1PDiw2Vzu9DpoIBrxvzbYEs8ad1OM5UlO4NVfUxBr B2L/KrB0iFg6vW0R5jwzHk2ge5tbgo/UL8Wg8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795890452; x=1796495252; h=user-agent:content-disposition:content-type:mime-version:cc:to :subject:from:message-id:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=tWonGarP/JSpfYSCREzqgbxCwkI6wgnwB8spvNKTl70=; b=oEisGp7btUqgvmtceNUTa7TniCtG93WgAPAtr3/H1AjDslcxWIPne6+3sMvcihg3tb 1WxTEyXBtrX0RXz/oUbgUtuCK2Cb6+yP4+IF3bi1TalldoXAvsEtCHWcRyFWdPuRulKG 5up59nLJxMish/R9FXtqnLs1PMA4VxvCZm0YT7LvGPc27JXX9qGoKC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ccskxZQ 8uemxVSSJcc3WcM2W6WlMwMttFZkvrqzI9QfYd43JJJ9wNbSUPQjKqtXLhnj23sLEO0pWYD9Ahm tlxqRUp540h2Oe1MTi6O8GlBJXOzwQ4PLHt/KacO+jU0x161uB+YoVx4bZE2/84NJQfWHOEaTNK 8c1i/dMeRlzVrHbJPIK5m8= X-Received: by 2002:a05:690c:e3f0:b0:8ab:48c5:cbce with SMTP id 00721157ae682-8b52049ff5bmr118121637b3.32.1795890452372; Sat, 28 Nov 2026 10:27:32 -0800 (PST) Received: from [172.20.0.3] (c-73-207-185-9.hsd1.ga.comcast.net. [73.207.185.9]) by smtp.gmail.com with ESMTPSA id 00721157ae682-8b59a06f3e9sm14464277b3.25.2026.11.28.10.27.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Nov 2026 10:27:31 -0800 (PST) Date: Sat, 28 Nov 2026 10:27:30 -0800 Message-ID: From: Chris Down Subject: [PATCH v2 0/7] kho, liveupdate: KHO/LUO observability To: Pasha Tatashin , Mike Rapoport , Pratyush Yadav Cc: Alexander Graf , Baoquan He , Jonathan Corbet , Shuah Khan , kexec@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-team@meta.com, Breno Leitao , sashiko-bot@kernel.org X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/2.4.3 (cc9e3943) (2026-10-09) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261128_102734_103067_B22E7F21 X-CRM114-Status: GOOD ( 15.30 ) X-Spam-Score: -2.1 (--) X-BeenThere: kexec@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kexec" X-Spam-Status: No, score=-12.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 At Meta, we are moving towards using live update on hypervisors whose VMs can't be migrated away first. We also want to preserve service fd stores across systemctl kexec. Our kernel rollout is driven by health checks from each host. For example, an increase in rejected handovers or retrieval failures may be a reason to stop a rollout, and the sequence number helps us understand what is happening on which hosts. The series exposes: - whether the new kernel accepted the incoming handover - how much of the preserved memory has been restored - whether LUO could give back the state that userspace handed over We expose these in sysfs so the collector can read them without opening /dev/liveupdate, which starts deserialisation, or depending on debugfs or the kernel log. I also noticed that the incoming kexec metadata page stays reserved after boot, so free it once its contents have been copied. Pratyush's "kho: housekeeping" series (https://lore.kernel.org/r/20261127122536.3708770-1-pratyush@kernel.org) renames kexec_handover.c and kexec_handover_internal.h and changes kernel/liveupdate/Makefile. This series changes the same three files, so whichever lands second needs a rebase. v2: - Rebase onto the current liveupdate next - Free the metadata page without reordering kho_init(), now that kho/in/sub_fdts is gone (Pasha) - Drop the Fixes tag from the metadata page patch (Pasha) - Drop the bootmem size patch and its selftest (Pratyush) - Move the KHO files to /sys/kernel/kho/incoming/, set up by KHO in kho_sysfs.c, so kexec_core.c is no longer touched (Mike) - Add tags from Breno and Pasha v1: https://lore.kernel.org/r/cover.1794383544.git.chris@chrisdown.name Chris Down (7): kho: Reclaim the metadata page left reserved after kexec liveupdate: Make failed retrieves distinguishable from dropped files selftests/liveupdate: Catch incorrect file accounting across kexec kho: Expose rejected handovers that look like cold boots kho: Report how much handover memory is preserved and restored liveupdate: Expose the sequence number for consecutive live updates selftests/liveupdate: Check handover revival, sequence and memory stats .../ABI/testing/sysfs-class-misc-liveupdate | 56 ++++ Documentation/ABI/testing/sysfs-kernel-kho | 21 ++ Documentation/admin-guide/mm/kho.rst | 11 + Documentation/userspace-api/liveupdate.rst | 8 + MAINTAINERS | 3 + kernel/liveupdate/Makefile | 2 +- kernel/liveupdate/kexec_handover.c | 26 ++ kernel/liveupdate/kexec_handover_internal.h | 10 + kernel/liveupdate/kho_sysfs.c | 70 +++++ kernel/liveupdate/luo_core.c | 58 ++++ kernel/liveupdate/luo_file.c | 16 +- kernel/liveupdate/luo_internal.h | 34 +++ kernel/liveupdate/luo_session.c | 6 + tools/testing/selftests/liveupdate/Makefile | 1 + tools/testing/selftests/liveupdate/init.c | 5 + .../selftests/liveupdate/luo_handover_stats.c | 258 ++++++++++++++++++ .../selftests/liveupdate/run-vmtests.sh | 1 + tools/testing/selftests/liveupdate/vmtest.sh | 2 + 18 files changed, 585 insertions(+), 3 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-class-misc-liveupdate create mode 100644 Documentation/ABI/testing/sysfs-kernel-kho create mode 100644 kernel/liveupdate/kho_sysfs.c create mode 100644 tools/testing/selftests/liveupdate/luo_handover_stats.c base-commit: a8d435799f3c87231bca0c245fd9e60f31e45135 -- 2.56.1