X Tutup
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: saraWebdev/npgsql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: dev
Choose a base ref
...
head repository: saraWebdev/npgsql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: pool-contention
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 15 commits
  • 6 files changed
  • 2 contributors

Commits on Aug 27, 2019

  1. Don't force the full continuation to be pool dispatched, just user co…

    …de (via Task.Yield)
    
    Tcs now doesn't force continuation to be dispatched to the pool so we can execute our pool waiting code inline on the release thread, including the state update
    NinoFloris authored and roji committed Aug 27, 2019
    Configuration menu
    Copy the full SHA
    5bef866 View commit details
    Browse the repository at this point in the history
  2. Remove state.Waiting entirely, rely on concurrent queue and our state…

    ….Idle read after enqueue to prevent waiting threads from deadlocking or timing out
    NinoFloris authored and roji committed Aug 27, 2019
    Configuration menu
    Copy the full SHA
    a34a8d4 View commit details
    Browse the repository at this point in the history
  3. Convert state.Idle and Busy to an int so we can replace all independe…

    …nt (only Idle OR Busy) CAS loops for straight XADD (Decrement/Increment)
    
    Interesting read about CAS vs XADD https://blogs.oracle.com/dave/atomic-fetch-and-add-vs-compare-and-swap
    NinoFloris authored and roji committed Aug 27, 2019
    Configuration menu
    Copy the full SHA
    2c4e27c View commit details
    Browse the repository at this point in the history
  4. Fixes todo around unblocking waiters now that may happen more often w…

    …ith state.Waiting being replaced by cancelled TaskCompletionSources
    NinoFloris authored and roji committed Aug 27, 2019
    Configuration menu
    Copy the full SHA
    c483773 View commit details
    Browse the repository at this point in the history
  5. Implementation of fixes and new design, there are no CAS loops anymor…

    …e as there isn't a single data dependency (combined read) that needed it left
    NinoFloris authored and roji committed Aug 27, 2019
    Configuration menu
    Copy the full SHA
    cab9c0c View commit details
    Browse the repository at this point in the history
  6. Optimize releases by assigning connectors a fixed pool index for thei…

    …r entire lifetime
    NinoFloris authored and roji committed Aug 27, 2019
    Configuration menu
    Copy the full SHA
    1f438a4 View commit details
    Browse the repository at this point in the history
  7. Remove state copy from inner ToString

    NinoFloris authored and roji committed Aug 27, 2019
    Configuration menu
    Copy the full SHA
    5a14410 View commit details
    Browse the repository at this point in the history
  8. Revert "Don't force the full continuation to be pool dispatched, just…

    … user code (via Task.Yield)" as there's zero pool state changing before we move to user code
    NinoFloris authored and roji committed Aug 27, 2019
    Configuration menu
    Copy the full SHA
    47337be View commit details
    Browse the repository at this point in the history
  9. Improve readability of Release by moving the loop closer to its user,…

    … making it clear no continue is to be called after any Increment/Decrement is done
    NinoFloris authored and roji committed Aug 27, 2019
    Configuration menu
    Copy the full SHA
    0d0d35e View commit details
    Browse the repository at this point in the history
  10. Removes Busy entirely and remove random idle scanning as we have rand…

    …om releasing, brings back bounds check elimination
    
    There's some false sharing during connector open and release/allocate but during steady state fastallocate/release that's not relevant at all. Not going to add padding for it.
    NinoFloris authored and roji committed Aug 27, 2019
    Configuration menu
    Copy the full SHA
    ca2bdda View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    059e747 View commit details
    Browse the repository at this point in the history
  12. Addresses feedback

    NinoFloris authored and roji committed Aug 27, 2019
    Configuration menu
    Copy the full SHA
    a27e5fd View commit details
    Browse the repository at this point in the history
  13. Add missing volatile write

    NinoFloris authored and roji committed Aug 27, 2019
    Configuration menu
    Copy the full SHA
    c65d8ca View commit details
    Browse the repository at this point in the history
  14. Address feedback

    Addresses some nits
    Moved Busy read back into PoolState for an atomic read
    Introduced CAS loop for Close when closing Idle connectors
    Changed pruning Timer logic to be non allocating
    Inverted TrySetCanceled branch for better readability
    Introduced Assert for checking whether a connector got a pool index
    NinoFloris authored and roji committed Aug 27, 2019
    Configuration menu
    Copy the full SHA
    d3422b1 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    55b2df4 View commit details
    Browse the repository at this point in the history
Loading
X Tutup