Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support foreign threads, and adding threads at run time #45447

Closed
wants to merge 2 commits into from

Commits on Aug 9, 2022

  1. [Profile] allocate exactly the space requested

    With dynamic thread counts, we cannot ensure this count is constant
    after initialization, and we might like to even profile adding and
    removing threads.
    vtjnash committed Aug 9, 2022
    Configuration menu
    Copy the full SHA
    6038398 View commit details
    Browse the repository at this point in the history
  2. threading: support more than nthreads at runtime

    Hook a couple functions (notably cfunction) to handle adopting
    foreign threads automatically when used.
    
    n.b. If returning an object pointer, we do not gc_unsafe_leave
    afterwards as that would render the pointer invalid. However, this means
    that it can be a long time before the next safepoint (if ever). We
    should look into ways of improving this bad situation, such as pinning
    only that specific object temporarily.
    
    n.b. There are some remaining issues to clean up. For example, we may
    trap pages in the ptls after GC to keep them "warm", and trap other
    pages in the unwind buffer, etc.
    vtjnash committed Aug 9, 2022
    Configuration menu
    Copy the full SHA
    09b7af3 View commit details
    Browse the repository at this point in the history