Skip to content

Support non-round-robin scheduling #4230

Open
@RalfJung

Description

@RalfJung

Miri now randomly yields the current thread every now and then, but currently it always yields to the next thread, i.e. it's a round-robin scheduler. It would probably be good to randomize this more and pick some arbitrary unblocked thread whenever we have yielded.

To still provide a fixed schedule for testcases, we could have a flag -Zmiri-fixed-schedule that disables both automatic yielding and that forces things to be round-robin again. All existing tests that use -Zmiri-preemption-rate=0 should then use this new flag instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-concurrencyArea: affects our concurrency (multi-thread) supportC-enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancementE-good-first-issueA good way to start contributing, mentoring is available

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions