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 slow path performance for allocation #143

Merged
merged 39 commits into from
Mar 31, 2020

Commits on Mar 16, 2020

  1. Remote dealloc refactor.

    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    1e454cc View commit details
    Browse the repository at this point in the history
  2. Clang format

    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    91b7e08 View commit details
    Browse the repository at this point in the history
  3. Clang format again.

    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    ffb7b82 View commit details
    Browse the repository at this point in the history
  4. Improve remote dealloc

    Change remote to count down 0, so fast path does not need a constant.
    
    Use signed value so that branch does not depend on addition.
    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    78f40d4 View commit details
    Browse the repository at this point in the history
  5. CR feedback.

    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    a22e438 View commit details
    Browse the repository at this point in the history
  6. Clang format.

    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    0274b71 View commit details
    Browse the repository at this point in the history
  7. Inline remote_dealloc

    The fast path of remote_dealloc is sufficiently compact that it can be
    inlined.
    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    d080654 View commit details
    Browse the repository at this point in the history
  8. Improve fast path in Slab::alloc

    Turn the internal structure into tail calls, to improve fast path.
    Should be no algorithmic changes.
    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    bac6336 View commit details
    Browse the repository at this point in the history
  9. Refactor initialisation to help fast path.

    Break lazy initialisation into two functions, so it is easier to codegen
    fast paths.
    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    a52aca6 View commit details
    Browse the repository at this point in the history
  10. Fixup

    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    bd8c443 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    267a726 View commit details
    Browse the repository at this point in the history
  12. Refactor semi-slow path for alloc

    Make the backup path a bit faster.  Only algorithmic change is to delay
    checking for first allocation. Otherwise, should be unchanged.
    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    52c0ff0 View commit details
    Browse the repository at this point in the history
  13. Test initial operation of a thread

    The fisrt operation a new thread takes is special.  It results in
    allocating an allocator, and swinging it into the TLS.  This makes
    this a very special path, that is rarely tested.  This test generates
    a lot of threads to cover the first alloc and dealloc operations.
    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    e563bfb View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    a1d139c View commit details
    Browse the repository at this point in the history
  15. Fix large alloc stats

    Large alloc stats aren't necessarily balanced on a thread, this changes
    to tracking individual pushs and pops, rather than the net effect
    (with an unsigned value).
    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    f9e0f64 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    37d7e15 View commit details
    Browse the repository at this point in the history
  17. Fixup slab refactor

    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    075874e View commit details
    Browse the repository at this point in the history
  18. Minor refactor.

    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    68b49df View commit details
    Browse the repository at this point in the history
  19. Minor refactor

    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    f8b77a8 View commit details
    Browse the repository at this point in the history
  20. Add Bump ptrs to allocator

    Each allocator has a bump ptr for each size class.  This is no longer
    slab local.
    
    Slabs that haven't been fully allocated no longer need to be in the DLL
    for this sizeclass.
    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    d656232 View commit details
    Browse the repository at this point in the history
  21. Bug fix

    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    54dcb20 View commit details
    Browse the repository at this point in the history
  22. Change to a cycle non-empty list

    This change reduces the branching in the case of finding a new free
    list. Using a non-empty cyclic list enables branch free add, and a
    single branch in remove to detect the empty case.
    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    bd19484 View commit details
    Browse the repository at this point in the history
  23. Comments.

    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    ed69bbb View commit details
    Browse the repository at this point in the history
  24. Update differences

    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    06032f2 View commit details
    Browse the repository at this point in the history
  25. Rename first allocation

    Use needs initialisation as makes more sense for other scenarios.
    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    941e28a View commit details
    Browse the repository at this point in the history
  26. Fixup for thread alloc.

    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    8a8a2f6 View commit details
    Browse the repository at this point in the history
  27. Clangformat + CR feedback

    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    2215815 View commit details
    Browse the repository at this point in the history
  28. More CR

    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    a857b92 View commit details
    Browse the repository at this point in the history
  29. Revert "More CR"

    This reverts commit a857b92.
    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    841314e View commit details
    Browse the repository at this point in the history
  30. CR attempt two.

    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    baff3ef View commit details
    Browse the repository at this point in the history
  31. Fix assert

    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    6bf7115 View commit details
    Browse the repository at this point in the history
  32. Bug fix found by CI.

    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    193e27a View commit details
    Browse the repository at this point in the history
  33. Clang tidy.

    mjp41 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    6d60feb View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2020

  1. Configuration menu
    Copy the full SHA
    04e74c4 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2020

  1. Configuration menu
    Copy the full SHA
    0c40c84 View commit details
    Browse the repository at this point in the history
  2. Make GlobalPlaceholder zero init

    The GlobalPlaceholder allocator is now a zero init block of memory.
    This removes various issues for when things are initialised. It is made read-only
    to we detect write to it on some platforms.
    mjp41 committed Mar 25, 2020
    Configuration menu
    Copy the full SHA
    65bb8c1 View commit details
    Browse the repository at this point in the history
  3. Comment.

    mjp41 committed Mar 25, 2020
    Configuration menu
    Copy the full SHA
    50486c0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4fd24db View commit details
    Browse the repository at this point in the history
  5. Clang format.

    mjp41 committed Mar 25, 2020
    Configuration menu
    Copy the full SHA
    4b19611 View commit details
    Browse the repository at this point in the history