mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-10 06:24:09 +09:00
TEMPORARY, investigation only, same throwaway branch, never merged. The arms already here price INDEPENDENT work: 24 threads on 16 cores, each running its own loop. Guest vCPUs are not independent. SMP bring-up, IPIs and lock handoffs all need several vCPUs on a core at the same instant, and no throughput figure can see that -- which is why the aggregate numbers from the scaling arms cannot answer the question the e2e pinning change rests on. That question is whether two vCPUs of ONE guest sharing a physical core costs more than two vCPUs of DIFFERENT guests sharing one. The runner's scheduler cannot draw the distinction, because nothing above it says which threads are coupled, so if the distinction is real it is ours to express and if it is not there is nothing to express. Three groups of eight processes, all running at once, each round a fixed chunk of work then a barrier: a round ends only when all eight arrive, so a process off-core holds up the seven on it. Three placements. `same` and `cross` are held to the SAME twelve cores with the SAME doubling and differ only in whether the pair sharing a core belongs to one group -- without that matching the comparison measures core count, since a placement over sixteen cores beats one over twelve whatever the pairing. `float` sets no affinity and is the reference point rather than part of the controlled comparison. The statistic is the median of per-repeat same/cross ratios, not a ratio of aggregates: arms are interleaved so drift lands in all three equally, and pairing two measurements taken seconds apart removes most of what is left. The verdict is written before the run -- every repeat above 5% means the distinction is real, every repeat inside 5% means it is not and the e2e change is not worth a run, anything else concludes nothing. A barrier blocks rather than spins, so a waiting process leaves its sibling the whole core. That is the co-scheduling half of the claim and not the spin-wait half, where a preempted lock holder also burns its sibling's cycles, so this reads as a lower bound on the effect. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>