Repository navigation
block: flush the image with fdatasync instead of a full fsync - #2
Merged
Merged
Conversation
A guest flush asks that written data survive a crash. fdatasync gives that: the data plus the metadata needed to read it back. fsync also commits the timestamps, and on ext4 every O_DIRECT write updates the image mtime, so each guest flush forced a host journal commit on top of the device flush. This was already in QEMU already. Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
Author
|
Seems like none of the failures are from the PR but pre-existing, can open another PR if needed. |
bleggett
approved these changes
Oct 13, 2026
asher
pushed a commit
that referenced
this pull request
Oct 15, 2026
The deterministic cache leaf (0x8000_001d on AMD, 0x4 on Intel) is inherited verbatim from the host via KVM_GET_SUPPORTED_CPUID, so its "logical processors sharing this cache" field still describes the host's last-level cache span (e.g. a whole CCX). When a guest is given a multi-package topology to back a vNUMA layout, the guest's LLC then appears to cross NUMA node boundaries and the kernel warns: sched: CPU #2's llc-sibling CPU #0 is not on the same node! Re-derive the cache-sharing field from the topology we synthesize: per-core caches (L1/L2) share across a core's threads, and the last-level cache shares across a whole package (== one vNUMA node). Cache geometry is left untouched, and single-package guests keep the host's cache topology, which is already self-consistent. Signed-off-by: Steven Noonan <steven@edera.dev>
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.
A guest flush asks that written data survive a crash. fdatasync gives that: the data plus the metadata needed to read it back. fsync also commits the timestamps, and on ext4 every O_DIRECT write updates the image mtime, so each guest flush forced a host journal commit on top of the device flush. This was already in QEMU already.
Using sysbench to measure the perfs:
One guest fsync goes from 2.5x native to 1.4x. Cells without flushes stay within run-to-run noise. On a block device backing (a loop device) nothing changes, as expected: the kernel ignores the datasync flag there.
Ref COR-63