Skip to content

runner: enforce single-runner-per-host for host-global tuning #924

Description

@epompeii

Follow-up hardening item from the #923 review.

Host tuning mutates host-global state (sysctls, IRQ affinities, THP mode, and the /sys/fs/cgroup/bencher cpuset partition). Two concurrent runner processes on one host will restore that state out from under each other on shutdown: the first to exit demotes the partition and reverts IRQ affinities while the second is still benchmarking.

Today this is documented as a single-runner-per-host assumption in the tuning module docs (plus/bencher_runner/src/tuning/mod.rs). The suggested hardening is to enforce it, e.g. an advisory flock on a well-known path (crash-safe, auto-released like the /dev/cpu_dma_latency fd) taken before tuning applies, with a clear error or warning when a second runner starts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions