1. 19 Nov, 2018 1 commit
    • Maged Michael's avatar
      ConcurrentHashMap: Use hazptr_obj_batch. · 6100907a
      Maged Michael authored
      Summary: Use hazptr_batch and tagged objects for buckets and nodes. After this diff, higher-level users no longer need to call hazptr_cleanup. CHM destructor guarantees the destruction of all key and value objects that were in this instance of CHM.
      
      Reviewed By: djwatson
      
      Differential Revision: D10150474
      
      fbshipit-source-id: 99530971d157ce4ca0bb0a983b3f7eb40666885e
      6100907a
  2. 18 Nov, 2018 6 commits
    • Yedidya Feldblum's avatar
      Remove unused template param defaults in LockFreeRingBuffer · d4b4982c
      Yedidya Feldblum authored
      Summary: [Folly] Remove unused template param defaults in `LockFreeRingBuffer`.
      
      Differential Revision: D13113827
      
      fbshipit-source-id: 9400853cde60b8bc227383b2a0ab1efb95786d87
      d4b4982c
    • Yedidya Feldblum's avatar
      Defer all initialization until allocation in IndexedMemPool · 385b4994
      Yedidya Feldblum authored
      Summary: [Folly] Defer all initialization until allocation in `IndexedMemPool`. This provides a better guarantee that the constructor never dirties the allocated region by accidentally direct-initializing rather than default-initializing the linked list pointers in the mapped region.
      
      Reviewed By: davidtgoldblatt
      
      Differential Revision: D13046558
      
      fbshipit-source-id: 1bde547525e2502607d01e68206d7f8c826baebd
      385b4994
    • Lee Howes's avatar
      Remove dependncy on value-taking form of then from folly · 3222b57b
      Lee Howes authored
      Summary: Remove uses of folly::Future::then(task-taking-value) from folly and replace with thenValue.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13115197
      
      fbshipit-source-id: 3843ec2412a0dfc0c2ee7940ff7e17320215ff72
      3222b57b
    • Yedidya Feldblum's avatar
      invoke_cold, catch_exception · 6ec1462b
      Yedidya Feldblum authored
      Summary: [Folly] `invoke_cold`, `catch_exception`. These may be used to facilitate preprocessor-free-at-call-site `try`-and-`catch` in library code when compiling with `-fno-exceptions`.
      
      Reviewed By: swolchok
      
      Differential Revision: D13020421
      
      fbshipit-source-id: d9d7998e00eed6ced943ea73b648fa0b7cabd831
      6ec1462b
    • Aaryaman Sagar's avatar
      Remove inline asm from PicoSpinLock · 95934611
      Aaryaman Sagar authored
      Summary:
      Removes the inline asm from PicoSpinLock and uses the fetch_set and
      fetch_reset utilities instead
      
      Reviewed By: yfeldblum
      
      Differential Revision: D9697136
      
      fbshipit-source-id: 022bb2d2d9d7cd6ac8a0011bff4c8995db989950
      95934611
    • Orvid King's avatar
      Remove the file descriptor overload of shutdownNoInt · f98c3cdc
      Orvid King authored
      Summary: It's no longer needed
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13105079
      
      fbshipit-source-id: d9d1ea7cc11380ea0d17cfee6055e113b888e465
      f98c3cdc
  3. 17 Nov, 2018 12 commits
  4. 16 Nov, 2018 3 commits
  5. 15 Nov, 2018 5 commits
  6. 14 Nov, 2018 6 commits
    • Maged Michael's avatar
      hazptr: Batches and tags for managing destruction order. · b2df58ec
      Maged Michael authored
      Summary:
      Add batches and tags for objects protectable by hazard pointers.
      Add fine-grained cleanup of tagged objects (lower overhead than calling hazptr_cleanup).
      
      Design sketch:
      - The domain structure contains an untagged list and one or more tagged lists (more than one to reduce contention).
      - These domain lists support lock-free push and lock-free unlocked pop all. Tagged lists are locked by pop all operations and unlocked by push_unlock operations. Push operations are  lock-free even when a list is locked for pop all operations.
      - Batches are lists of retired objects.
      - Each object contains the address of a batch (or null). The lowest bit indicates if the batch address is used also as a tag.
      - hazptr_cleanup_batch_tag(tag) reclaims all objects with that tag without checking hazard pointers.
      - All objects in a domain tagged list contain tagged objects that hash to the index of the list.
      - Untagged object are those that are safe to reclaim at shutdown time, i.e., their deleter only reclaims memory without other dependencies.
      - For example, retired UnboundedQueue segments do not depend on user-defined destructors and their deleters merely reclaim memory using the default deleter, and therefore can be untagged.
      - On the other hand, the deleters of ConcurrentHashMap buckets and nodes depend on user-defined code and therefore their destruction must be managed explicitly. Therefore they are tagged.
      - Batches can be used even without tagging. For example retired UnboundedQueue segments are collected in batches because they have link-counting interdependencies and batches help keep related segments together.
      
      Reviewed By: davidtgoldblatt
      
      Differential Revision: D10147101
      
      fbshipit-source-id: 8820cf46ad8942c7362d91543bfbd9fe07e27b7a
      b2df58ec
    • Mingtao Yang's avatar
      SSLContext::loadCertificateFromBufferPEM should load entire chain · 77f06ada
      Mingtao Yang authored
      Summary:
      SSLContext::loadCertificate() loads a certificate chain with SSL_CTX_use_certificate_chain_file.
      
      A method named SSLContext::loadCertificateFromBufferPEM() should have the same semantics.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13037752
      
      fbshipit-source-id: da7b150065d2207421c6bba86d44ce5e2c57e1a9
      77f06ada
    • Lee Howes's avatar
      Split folly::futures::map over value and Try forms · df642f04
      Lee Howes authored
      Summary: Splits folly::futures::map over forms that take value continuations and try continuations. This allows the implementation to call Future::thenValue and Future::thenTry correctly.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D10861465
      
      fbshipit-source-id: 31044127f43e574edcc01c6bb173ecc4f0c9c90e
      df642f04
    • Yiding Jia's avatar
      Fix folly/Range.h with c++17 and libc++ again · 90ae95ed
      Yiding Jia authored
      Summary:
      Avoid create StringViewType if value_type is not POD, as with libc++ there is a
      static_assert in the class body which seems to fail.
      
      Reviewed By: yfeldblum
      
      Differential Revision: D13015696
      
      fbshipit-source-id: 090e5cd3f5e21aa8c22ea893e894b38fd3d2a745
      90ae95ed
    • Andrew Gallagher's avatar
      folly/executors: fix extraneous semi-colon · faa7f7fb
      Andrew Gallagher authored
      Reviewed By: yfeldblum
      
      Differential Revision: D13056552
      
      fbshipit-source-id: 910296cda7d392972a48c8fa3e425b4bdeaa5d26
      faa7f7fb
    • Yedidya Feldblum's avatar
      Move asm_rdtsc to its own header and rename · aedf6079
      Yedidya Feldblum authored
      Summary: [Folly] Move `asm_rdtsc` to its own header and rename to `hardware_timestamp`.
      
      Reviewed By: aary, Orvid
      
      Differential Revision: D10368436
      
      fbshipit-source-id: 88a6d1d50702e80fb3ebba5035116850c49df6ea
      aedf6079
  7. 13 Nov, 2018 6 commits
  8. 12 Nov, 2018 1 commit