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

Improve the concurrency of erts_fun_table insertions #8662

Closed

Commits on Jul 12, 2024

  1. Improve the concurrency of erts_fun_table insertions

    While the erts_fun_table is protected by a read-write lock, when
    ensuring a fun, the runtime always acquires a writer lock allowing it
    to insert if the lookup fails.  This has the undesirable effect of
    serializing the insertions even in the degenerate case where the fun
    is already present and the table does not need to be modified.
    
    This change uses a reader lock initially to offer more concurrency in
    the case where the fun is present, which can be a common case for
    applications that repeatedly transmit essentially the same fun objects
    between nodes.  If the lookup fails, the code behaves as it did before
    and falls back to acquiring a writer lock and doing a lookup and
    insert as needed.
    lexprfuncall authored and lexprfuncall committed Jul 12, 2024
    Configuration menu
    Copy the full SHA
    1cffbf6 View commit details
    Browse the repository at this point in the history