From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 684D4606A6B1 for ; Sat, 28 Nov 2026 18:27:42 +0000 (UTC) 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=Z1laEPMx Received: by kanga.kvack.org (Postfix) id 743946B05B3; Sat, 28 Nov 2026 13:27:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6F44F6B05B4; Sat, 28 Nov 2026 13:27:36 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5BCC06B05B5; Sat, 28 Nov 2026 13:27:36 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 2674D6B05B3 for ; Sat, 28 Nov 2026 13:27:36 -0500 (EST) Received: from smtpin22.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 476051206D2 for ; Sat, 28 Nov 2026 18:27:35 +0000 (UTC) X-FDA: 85485360870.22.2DF8660 Received: from mail-yw1-f182.google.com (mail-yw1-f182.google.com [209.85.128.182]) by imf19.hostedemail.com (Postfix) with ESMTP id 7E8611A0009 for ; Sat, 28 Nov 2026 18:27:33 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=chrisdown.name header.s=google header.b=Z1laEPMx; spf=pass (imf19.hostedemail.com: domain of chris@chrisdown.name designates 209.85.128.182 as permitted sender) smtp.mailfrom=chris@chrisdown.name; dmarc=pass (policy=quarantine) header.from=chrisdown.name ARC-Seal: i=1; a=rsa-sha256; d=hostedemail.com; s=arc-20220608; cv=none; t=1795890453; b=dtQ94754j6rfdTdDjXpaAPH/K5fYgWfgKokHrfGJtSJWf+xokzYvg+J1AbSvs/y1r3YHn0 Nwuj75VPfvDzEZfqUCXO5cTdTcFEq1bAssdHdihPap+mTUDgpDs5aQ0QiyVxUmaeK5PekB NHoibYxFAMvJPnaRkfdaj8/OA501A+s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1795890453; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=tWonGarP/JSpfYSCREzqgbxCwkI6wgnwB8spvNKTl70=; b=hMibKJ8P5VT96/OEeeb9OA8ZhjpvtI9XXBNKVPMVqCxm1xn5DzNRBPOxou0x+fjsVauHLg R7oYV2vx5/7dH+xWOtvgm9PsH8m5ouLjLKvy3l4uCFP/p1Z4/iEqQkVaWypbNR19//cnoA iIOlQp1nP0cHD70U3KJOunAhe7MxvG0= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=chrisdown.name header.s=google header.b=Z1laEPMx; spf=pass (imf19.hostedemail.com: domain of chris@chrisdown.name designates 209.85.128.182 as permitted sender) smtp.mailfrom=chris@chrisdown.name; dmarc=pass (policy=quarantine) header.from=chrisdown.name Received: by mail-yw1-f182.google.com with SMTP id 00721157ae682-8b5981c4834so12312257b3.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=kvack.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=Z1laEPMx6WluKEyrRYjPFpL2/UxvizZ4ZKdm/y6BzvuBvKhQ9kSSRHB8zTKv5HO4GB mQvJGUBbaoj+p333Kz7VGdxQ/FkElZmyfO3BERfDR2asBioqIDQW873LX6LmVrefwydW RHmZOiEXPq95/EUdlLkeH/4ziiGYaZWmg9yJA= 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=gJAYe2q0tLsqYijYVaMEy9fBtQjyt7G1Gvf2quuWEV8RLBCZEfLi4XtFVvH/pvA4pN D17ouvJt1FyZ0576MNNFUKZUOC9FbscwqHtO8GhiMmnWr2+Rtrf8FfsOXHmKUzPNSop2 zruPFwgUeWXMaAexWIQ0NSY2IBLWuH8sYmuGH8xH97tNoBMG+m5htZYuNkwpkOE1G8JG KL/6HXZ5y+A3Ju7+xm3E895QugQ7BbBVycI/MnW3jMgzx6BFttIW0NQ/jKX8v3dsGv0p oH23N6Vp91ucXUPvQHOxvK7NiF6EN/jqhSXaFmF5U8Pyh53IIZ6icdGPMqtipZKK9dvH 5vGg== X-Forwarded-Encrypted: i=1; AL+hErHhnNgCNzENb+S7odMiBb1clWOIlHkmEhEdywB4ekpg32WR2KoGDpUhyjXEP4vb9pT0ac05KRwd4Q==@kvack.org X-Gm-Message-State: APuU4Z80EzlWCZzTqK9yM4AK4XgxciOOl45XCBe14/6ea41/F7FLixJn kuECoirp4MfNKuQoeci9gbYsXNaSsqf1/a7fWEwO/NRbT5zwm+y4kH5QK+2852musLk= X-Gm-Gg: AZFdTZezG6416Zzlse7G9V4eaucpFbtUIh3Ebos1ZyuxMCxvdl/Zgqm149Smx1+DMxI M11A3jGbVWSzADPld6CRBnNVhxotIBFfeo3rTGVezr13FwJjMn5WUrssUapvOJSw7AuklNW7lI7 0TxhOGbtc080VRE4npkL1NDDAOGPK1dRW6s8z64apNqpTbnvj3oLEdtue3oEbqVDvJ0ooAn6JNf tn9UyVHvWP5dGmE+jLrOVEviVYu4MZA/mzIdtggO37RZ/XSeYoeA9asqMqDDtgLiFhXvMK2YDAW wsJMp+1iEHNHfduiDdoVRxC0cWorbrlM2mRey/MHT61MHkfzh3jceuWmZl+Qg9ERHENpRZRDK8i FQEljCcQ0nlrkXmHZ4AAnUttDa9mpvdn7BzYEh4kCYSUNNH1WVppng0dv6VNytxBE1tHYccNUOJ ixOARyJvP7wbx40/zS+ydfBec6NIo+ZqU+5kgjUJmji0pn/78PXuaVT1Y4BO5s/JTYWUrt0MiT1 82j9vwgyg5NOIGlMnu8Ip+2itTCcON3o5AEeb17bI2Kr0YHKfZrYG/CkM2H07zLbp3KFKHBBP5G GlYnz38uG8Ihdm/QFl1agYy65v2nXXXxLaSA9HYj6xnIYnApFY69rQn/Vnqx+w90A41P8WSJcTp MjFasbVxdQzRYeI6YTaMIQqTvypU7zv0R9aMATg4kTOj/fCRkD/BAsAr3+RH9H/VrHehsEXYqj4 XiBypuP0XCDGQoO+4b2hhrYV44oTNfTwqrTjXl2qomqunjdKnPCWkBTMkILDbS6SgK1M996wQC6 XvKRukfx7zlI12tdUcZ9Do= 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-Rspam-User: X-Rspamd-Queue-Id: 7E8611A0009 X-Stat-Signature: nmpgks7pyskshkhfio8sarkxk8w4b4f3 X-Rspamd-Server: rspam12 X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=4.0.1 X-HE-Tag: 1795890453-106192 X-HE-Meta: U2FsdGVkX18D0tEsTYcuOOMjyhyxApbIHxth2D/wdUDkPSCMhTPi4V3PYmVwkP257WqrzoxOoBRNell3K7MjMjZMFN+eN9Eacxgage0n/+SNLqKHBvsB4WcUOE1duR97DFQB6E+ZxzJUYahezEg5MjLGLOEk9PBaXyz+s2xdSTp8SEuPG2sYVwUe631WH+83MEx/QFQ7ldY2EP/DSFC5h1B1LPmKP7A/UpuAvrWS3ef2MsI5bHUzeXYWGPwUjeGvomev4x3er+ppQDZr+QwHYLhlTO4Xc1bYhegcEsoT+iX7RVsD0Hw4TeMdUDXN5Va1Htk+JvYYu/LuO7veURc9XcF+OEXG9yo2f6wcelgcfqonjKtRJupjP52ABouAWyYKQ2FJwm4Qqfqx4X1xkWvA6WIvB7AhGXcHTr0KBtaoeZDbRAsNtyjy883EUP+bqfgt08sJhNiP1tnM9J3b8bT/eaV7+yswA6nxvYdMVv+Cfe3PEUoq2X3MtkHNh/5k/4NE6pgLthLbtrxHAYJpyGRhghr7f3Guk2IJeR+YPTpnqUwCrA8BcttkpIVBNR9xzoPygpcSuSGEBx76JpR2M329A477KOKn9yBBdbw557bX5uD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op: owner-majordomo@kvack.org List-ID: List-Subscribe: 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