Threads
Cheat sheet · https://pcornel.dk/topic.php?topic=3450
Answer
Virtual threads describe the guest-visible relationship between logical processors and virtual cores. They are topology information and do not guarantee a direct mapping to host SMT sibling threads.
Remember
- Virtual thread topology can differ from host SMT topology.
- Two guest threads in one virtual core are not proof they run on physical SMT siblings.
- SMT exposure and scheduling policy are platform-dependent.
- Total guest logical processors remain the primary execution count seen by the guest scheduler.
First checks
lscpu | grep Thread— threads per core in guestvirsh capabilities | grep -A5 topology— host SMTcat /sys/devices/system/cpu/smt/active— host SMT active
Verify in this order
host SMT → guest threads → scheduler
Where it usually breaks
First mismatch in host capability/IOMMU/NUMA → hypervisor allocation/mapping → virtual hardware model → guest driver/enumeration → workload use; preserve identity/native error/pre-state before mutation.
VM Hardware → vCPU → Threads reference map
| Boundary | Meaning | Evidence limit |
|---|---|---|
| Guest thread | Logical processor relationship | Topology presentation |
| Host SMT thread | Physical logical processor | Separate placement question |
| CPUID topology | Advertises hierarchy | Can be virtualized |
| Performance | Workload dependent | Must be measured |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3450