Repository navigation
feat(host): a recency hot set for every post-copy source from the kernel's idle-page bits (ADR 0045 C2) - #1612
Merged
Merged
Conversation
|
The latest Buf updates on your PR. Results from workflow CI / buf (pull_request).
|
nikhilunni
force-pushed
the
feat/postcopy-idle-hot-set
branch
5 times, most recently
from
October 8, 2026 03:12
f901310 to
f791c53
Compare
…nel's idle-page bits (ADR 0045 C2) A live move of a File-mode fresh session shipped an empty hot rider, so the destination drained 8 GiB in manifest order while agentd faulted its working set on demand. The hot-first drain existed; it had nothing to order by for a source without a UFFD handler. - Presetup marks the guest's present, exclusive, anonymous pages idle through `/sys/kernel/mm/page_idle/bitmap` (compound pages by head, resolved from `/proc/kpageflags` with a linear extent cache). The capture keeps today's dirty scan only; PFN collection and the idle read run after the export is registered, while the source stays paused, so the blackout is unchanged. - Accessed pages aggregate per chunk, ordered by count then offset, mapped to chain-manifest hashes, capped at 4096 for the idle tier; the handler-trace tier stays whole and goes first. - The hint is its own optional export artifact (`MigrationItem::HotHint`), fetched by the destination only after `state.bin` lands, with backoff, never touching the export lease, and stopped by the locally observed drain. The destination drain starts at once in manifest order and reorders the remaining chunks when the hint arrives. A hint is advisory: no hint path can fail, delay or block a move. - `HostCapabilities.page_idle` is an informational probe. Wire version 35. Tests: PFN word/bit math, shared-page exclusion, aggregation and ordering, hash mapping and caps, compound-extent op count, trace-first priority; a Linux root test marks and reads a private mapping; a fake-inner test drives capture and the destination poller with hints absent, empty, delayed, malformed and failed; the two-host KVM test asserts move success and hint arrival; the drain reorder is proven deterministically on a fake peer. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UHxL6gj4o8EvxYpgtwEWaM
nikhilunni
force-pushed
the
feat/postcopy-idle-hot-set
branch
from
October 8, 2026 03:15
f791c53 to
51264a1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Gives every post-copy source a recency hot set so the destination drains the pages the guest will touch first (ADR 0045 C2). A live move of a File-mode fresh session shipped an empty hot rider (
outcome="no_trace"), so the destination drained 8 GiB in manifest order while agentd faulted its working set on demand. The hot-first drain existed; it had nothing to order by for a source without a UFFD handler.The change
/sys/kernel/mm/page_idle/bitmap(compound pages by head, resolved from/proc/kpageflagswith a linear extent cache). The capture keeps today's dirty scan only. PFN collection and the idle read run after the export is registered, while the source stays paused, so the blackout is unchanged.MigrationItem::HotHint, proto 6, bincode 3) fetched only afterstate.binlands, with backoff, never touching the export lease, and stopped by the locally observed drain outcome. The destination drain starts at once in manifest order and reorders the remaining chunks when the hint arrives.HostCapabilities.page_idleis an informational probe (ADR 0068); it never gates placement. Wire version 37.Tests
PFN word/bit math; shared-page exclusion; aggregation and ordering; hash mapping and caps; compound-extent operation count; trace-first priority; a Linux root test marks and reads a private mapping; a fake-inner test drives the real capture and the real destination poller with hints absent, empty, delayed, malformed and failed, asserting
state.binlands each time; the two-host KVM test asserts move success and hint arrival; the drain reorder is proven deterministically on a fake peer, including hints naming only installed or unsealed chunks.Validation
just checkgreen (2776 tests); Linux cross clippy for host-agent, uffd-handler, core, protocol and firecracker clean; five Codex adversarial review rounds, final verdict approve on the code and the last test-determinism finding fixed.Note
🤖 Generated with Claude Code
https://claude.ai/code/session_01UHxL6gj4o8EvxYpgtwEWaM