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=Xaj3vIx7VDtGalTR/Zol//1qV4zXy3FSTc+AtOvxjYv/ZOV68tBFfNDjSE50vci4XRTO jHtstF4BrHJzhd0f8DlCtELnez3oERrD+AhznHJ8zoVvhUDtRds8hBDFOeUgnBdidYLHB 1cdfFuSpYp2n59MPGMKiPhKi7w+c1gINLUlrgnkgQMrBLwv+wemK1G+trTFyEmwARrhML qer8NpOiPKjwVdHIJN6Ol9ccdQjMD+LyGC/aBoFWvDcmsi3H5YJNSTr5B3Ttbc0yDFKNa Y/1umcVN64yrXrRCHUzAUDWFxsesSHJUlOLYDLWt5M5mEFuBj6PKFrIc29V6cRHXuQg== 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=UkG1lIVrfzXKS6/KBmdbk67nQ1VUXP6Du0K04WspcmYDBPay/QPVmV/C976eEee+pizU v0/gHMVRT9OrDq5oR3JOz+C6589ai42HugxXDpTSrP7rcrG1JVcMdssrQLzUXUP2LmsuY TqI679KM2PjMLxy3eAHNy8bTS30Fx4pG7cSVOVOiJWyVLbwIJT5BHQ2hR1KemRLB/Mg4f aYQLwUSs41zTY1xsiUJQDKMLgJYq3dy0djDkHh6O4O7LBZWUwC63Ny4WL1VEG7quqiXsj dNQI4T8aNPzniPrbrfRaZ5PoqKMXqTB15eGbBJ51ZWYsPBVykAa+l9KJWcdH5TDQuqQ== 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 A8424606A323 for ; Sat, 28 Nov 2026 18:27:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A8424606A323 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-8b10d24345dso81946647b3.3 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=Gok+IcV0DqRXavYgsHOCwXk5PjjS1l64mJUiGFcyPBWoU//hup03ByJUEYOwwp9Omd 6vCEBw8I72m1zor3wjYy8gQ25PLuDS1/Vv5EbfCjpCepLxapbTwJwvggscE8pCLp5nwV TCyrqn5uKmL689S8eFE8hWvrqerfgFHc20pvvHgXiR4efBZT+WtEfpV1uqQbn/6c/LIQ 6vl3hG22C1nU91nUc8ZYOD6VaZLW0AjYkF+fQrnTFIiCo0sa2Mi4GpdodW3SfD8sbAFB WUCOaT05BMyb3MxL+t56vXAHIgmZBT/X6KJpKtzMk+1Az6NkzdxbfceSfkuiZvMFJLIY hmdg== X-Forwarded-Encrypted: i=1; AL+hErGZz2K29sMWAjqIg2c9SM3KcuZA7gChqt+QmHg+EgSoieX42czQm0q7vZdBbiVWVzJch92W93Pfz0w=@vger.kernel.org X-Gm-Message-State: APuU4Z9XJTgX1AFtDdmnA7W9T5K6EncNahzPEqizkpOotbQj8Xg99Mtc tysFOm7w+/KXNhqna1dr8pW3gIA+XD5H14qVqprKINcNEFWi8fcDSBxPPR2dK+wY+g0= X-Gm-Gg: AZFdTZecnGYyZiSkGmUUjuFytB0sBo9q4uREshfiIV98y50TfaxDH/z4knDTFMbbK+0 JQiaBjCmueW74lwucb40kVAm0aoXO3jGr7VOWuyZmS6EZmw/oF87QfUJo+DALBc6hsYq3rex95U 1m4ABjA9YN+uuBFFTD2o6XgdETE3rYXKUiacj9l3yVRTmDkpAtTIaO38BW2I9vFeM9C2s8bUeYp 2PbqJA5e9w2fmvowEl9Z4nw4lhhNOoXq919N/eE58aiJpHzPrOTOlBtdAUk4FfY4xXGIFfZYQdN oU/QaXtYKNgMDdwIfcVgh8GCptlcJ6vC2aXFojwdiBmX3H0GjaJ4gtz3kzxAUC9jLmNaf/aPWBO zwEJuYawVsEyqfevQk9raexokplPfVgVCGKGJ/BfFjjs49EpSV/Uj8crpBEfQeoABskvvbC9vv8 oS+A/H6Sso1Dg+MBBQ6x7ALtNrYo0hufsvxbwlS9BvESNy9Pf0xD5rddwcgQSMI5hVgjvGMwCVL mCLz8Ex+jVFkpoO83IruvO+L+cpKgJ+hzhr4G6Mxc6TIjj9crB28VP+eig4875jpSGB7+rdZ6XK 7oSy5GiLP6zMQ+4wzGQ1mPKjcdUCgOGh76K3xpMMos7Mw+p3u6Szv3ehSCMEmA9edlDQtcxuUrW P4H/bceVlhfWYE7V87GBeoro1QhwZsG5x9KZC2HaGGdDZqGku8AmCZN8h52bLSZS0Ld/3jZno49 DKGQ6dgDdGPXHA4MLEuQEJe8xRz4Oov4taHY/pu4N/220ISJmrZlOegzmsWGfus1sW5wL42L7Z1 Eb3cjuGZeh9IuoRaQnmcOw= 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-doc@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