Skip to content

Work stealing breaks local submit of per carrier pollers #111

Description

@franz1981

#108 can cause a JDK per carrier read poller to be temporarily stolen, so when a it unpark VTs the will eventually migrate to their "home" scheduler.
This home scheduler is not the one which has run the VT last time, making locality to break, despite be "sticky".
One option would be to resume the VTs back to the last scheduler who run them, making them to return to their home only if the yield again.
Probably stickiness is not very good...

Another option instead is to act like the FJ pool, but we need to keep track the last running scheduler for the poller and submit the VT to unpark to it, saving cross thread submissions.

A third option is not allow JDK pollers to be stolen, but this means that if a carrier is busy or unresponsive, none will make its read poller to make progress, which is still not great.
Having a CHM of read pollers/running scheduler is not a bad option, although it create a shared code path, which can be highly contended with aggressive workstealing of pollers. This is not great as updating the CHM can just happen right before running the JDK pollers, in the carrier which is currently draining, which is not great.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions