From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.175 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795890454; b=UiyK3cZvImPPtUh5isOmB0YULX7GzZg1kYYSe3e63KYqObsCaTTLEwkgLCvMt199LlZE yYH16P6hgmyGUDWaW7Qm1p8udjV6bs5ARCTsT3c3dkuRJbyPOKRv1lQwLOR+t2iNwa+KC O7L5+uQx93ffuq92tK2tiurQiFyBm5OIBXoZuvVZGKI+kBf+p6LLLpjmDOygJrN3JGMmU phUzovJhGkS8+Dp1rDQZedzdrjAYx4AZZnjqsrONETVCv3+/tpmTwbK4xDnSvqDYJPnhI zqEMvN1w9iBhUsXg/p0N97rEN1uL3VFvBXE7z/WaXVOG1mJB+0bP8zyVhJ0MrDhbtmg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795890454; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:Message-ID:From:Subject:To:Cc:MIME-Version:Content-Type: Content-Disposition:User-Agent; bh=tWonGarP/JSpfYSCREzqgbxCwkI6wgnwB8spvNKTl70=; b=X9JF7nhrhbEmMVUGoihIw+oSoyTb6dQv4KSPLextSaPBqTlwwi97jqSINoMb4llY+Acf MuuTCyjq0+3Uo5Z6N76gSdns4jphJL1EzqdG61V6p29Z1jp46Ap+wKszHDVLbyIMU3xd6 ZaRhzKwllQqrmNNMEVa8CkwLBQgeu8tRwHmp7oYc5HN9AwTbqWgS/SPIqw2Fze90sF7zM KWk9an1G+6IYkIp3RFmEdTLwYjQBIZiUawOKzXTLCHgbccg8b3ykgpEKKAhVaLH4p8bxb lAB4FU1c5KE79m3HJrriDKJqiyQgIhvN3g/B0p8DCzA/FJrWPQ8OWgeUZDOkLKBZaoA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=chrisdown.name; spf=pass smtp.mailfrom=chrisdown.name; dkim=pass header.d=chrisdown.name header.i=@chrisdown.name header.a=rsa-sha256 header.s=google header.b=R9Iqhrx1; arc=none smtp.remote-ip=209.85.128.175 Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com [209.85.128.175]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A837B606A321 for ; Sat, 28 Nov 2026 18:27:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A837B606A321 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=chrisdown.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chrisdown.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.a=rsa-sha256 header.s=google header.b=R9Iqhrx1 Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-8b4cd576f2aso65481447b3.0 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=vger.kernel.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=R9Iqhrx1BzU8RY4kUDg4dJfmPt8aDiqfDMf4yc9EFQHkVeugn7bh28sUOtfX4sxinY 5OyLMnxH2x3MSfJ/a3GaruNo1kN6WnrZgVirM+F9aHAZvy6HJvBEoeSD+MqdrMnnQQ/z 5TxCrva3sdrgewS5tuchNqwGmgeJlsxIuQMLk= 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=YwikEEkx/G7rhqHwx+YfxxJgCDWwi3BVQMIuP4SOCBG3rTcgAOh7674cYSWcyRxYfg xGJbzO2v4MkDLHArMCb6KpEIbNl9ZbKJGGFJyVJ3GNWOcvRR6S4zrAgy0JZLFWBAnVCR w9gR7b8xi0ba6MZs4pfqpAdh4SozSW1Y7/zywH7d4q+W/lyGb2FJlYx/FVsUnj8jVBGn zr92XWLHGZAuYNnD9O9N4sBvOjJ97Ty1B1rQcCD2RePdJsOrTL4Ftw3qKewpHGHxYkGF YoMvHon0CS/UcEvv4EyfPhWq3LYWbTXd0Hsb1DbyC05KZkCD9bGtMVdQEJ4nhDKpjYkK HW6g== X-Forwarded-Encrypted: i=1; AL+hErFoDkajX8D5heiaHgmxPsxY64rQDIx3Ajyd6qFwNUZtJ8j5ZLkTwj3+lRIdHZE4DO1eDrwPrRRzN7YwJhI=@vger.kernel.org X-Gm-Message-State: APuU4Z9Ph+p7Gjex5AolXWT8FeAlk9yvB69JWkadiN39hwNUZ+7pFHrc DSYo9nD5dqfS7cR0JQhmxLZPL5lOrkhMmnvAqaNJ5r+goBCCC0Y22IyOIUQvbyyKt/nGO0uv0TV 5oMv3WzGWBlAxYaDHGQ== X-Gm-Gg: AZFdTZeaYCeqrf3denEkk4kbxxKeExk6FCrM6q927P+L1tNQt8W32bspnOLUd8mWcw5 eos63gxXhnitOxzfbS2fCcweNev7c/qxXChQRzripbnv+aIkN5TCpQ3jsudj7cJ1h6nugZGIcMR anoYYcViZuVZxS0ZyWzlMUDNMJ2rwVuHE/qH/+xu62j12jbnRZkCsd7ZrNDFVwN7UJCu+7nJHP6 uS3Q8Hr6SJPgYZS7WE0BAUdosGev2NfgntgmDHv+4gF5xyOAB6Z6kXu1qH+ORzmrxvSwg41Y54y u7iF2/D3RuLLwIT4IsRl7zjU9PRrxcghEZgA9dzRDhp+xblgpyt6rfInC2n7rjoj+x6fCcWdOUE 3w7X9slxJ2Zvr/5T194R1vLSbEZ9bNpm3I73ptcsedG6rDIrVKjuuoZ0ierjZveqxVZtFnrh89J iR+dcXJwXTULw9htRIjDB8tsqZHTcKBcnNwl9uN+06BicqizCf2C76ajhXV1K+PVLJ9zzWz+pdP cFZ0ENbaB3RqbhM9+iob9uFdp4ynEqqSFts7o8kTY7YcHbX9TuiEi1UjE9KlpxIOXMQvb/ZgQlL kbcgCH79e3tAZdNxVsAWszjIiHSTzJ4iU6MuF98GUU10FLpedcDb2rPDyeEPKMlJCxnut8MV2FK 3itr7LWa0nUmgj3i0f1CyeeBQx/z/SLSQywCaXoua88R3V+FK+TsM6ITg+R3+PdTIK7cqTudaiB pQ8UKocacfFDrYPp08b1ufoDDPULSO0GaBSV/+XDJaRp8fN+P5VXzEHFLtEsxvoOLEjUCCqt8oq B5/PvuDjzGB7qRF06riUao= 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-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/2.4.3 (cc9e3943) (2026-10-09) 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