Skip to content

mobile: Add thread-placement policy hooks #46813

Open

Description

@jschwe

Currently servo doesn't attempt to do anything in terms of informing the scheduler what threads are important.
That can lead to very suboptimal results on heterogeneous architectures (placing script on little cores in a big.little architecture is obviously not great for performance).
Probably a proper solution for this should allow the embedder to modify or even design the policy.
Setting thread affinity in servo itself might also be quirky, so that would be another reason to place it at the embedder level.

Activity

  1. added
    I-perf-slowUnnecessary performance degredation.
    P-ohosAny version of OpenHarmony
    on Jul 27, 2026
  2. yezhizhen commented on Jul 28, 2026

    @yezhizhen
    Member

    Probably explains why my benchmark results for #45199 varies so much for different devices with same hardware config. (All my results are done on one device so it is consistent)

  3. Narfinger commented on Jul 28, 2026

    @Narfinger
    Contributor

    I wonder what a good design for this would be. Perhaps we can just have a big struct that has a bunch of callbacks per thread type and give that to constellation.

  4. jschwe commented on Jul 28, 2026

    @jschwe
    MemberAuthor

    The main thing I want to think about more is how embedder defined code can run reliably in cross process mode.
    Currently this works since we fork-exec the same binary (in servoshell), so the embedder code is all there. But that's just an accident, and I want to think what we need to require. Perhaps the code should be in a shared library that can be dlopened?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-perf-slowUnnecessary performance degredation.P-androidAndroid devicesP-ohosAny version of OpenHarmony

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions