Git Product home page Git Product logo

libqsbr's People

Contributors

outscale-mgo avatar rmind avatar swills avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libqsbr's Issues

EBR memory barriers

Hey - I was wondering about the full memory barriers (atomic_thread_fence with memory_order_seq_cst) in the EBR library.

Thinking about it, isn't it true that ebr_enter and ebr_exit essentially have acquire/release semantics? Could you get away with simple acquire/release memory ordering, instead of a full memory_order_seq_cst?

It would seem that in ebr_sync, when scanning all threads, if a LOAD-acquire is used to read each local epoch, this would "synchronize-with" all release operations in ebr_exit, guaranteeing a "happens-before" relationship with the thread doing ebr_sync and all threads that have exited a critical section.

So, doesn't this imply that EBR could get away with simple acquire/release memory ordering, rather than full memory barriers with memory_order_seq_cst?

static_assert(sizeof(qsbr_epoch_t) == 8, "expected 64-bit counter")

This assertion checks if qsbr_epoch_t is a 64 bit type:

static_assert(sizeof(qsbr_epoch_t) == 8, "expected 64-bit counter")

However, the code defines qsbr_epoch_t to be of type

typedef unsigned long qsbr_epoch_t;

which may be a 32 bit type. Please change the code such that qsbr_epoch_t is instead a 64 bit type:

typedef unsigned long long qsbr_epoch_t;

gc_limbo is not thread-safe?

I've been reading over the source for libqsbr - it looks like a great library which I'd like to use in a few applications, however I'm confused about one aspect of the design. Specifically, regarding the code that inserts removed elements into the limbo list - why is this code not thread-safe? I mean, the code for gc_limbo, for example, does not use any memory barriers or atomic instructions when it adds the removed element into the limbo list. And the limbo list is not thread-local. Yet, the example in the README file indicates that we can call gc_limbo from any random worker thread. So how is this possible?

It would seem that since gc_limbo does not use memory barriers or atomic instructions, it would only be safe to call it from one thread - perhaps a specially designated "reclamation thread" or something - except the README seems to imply we can call gc_limbo from any arbitrary worker thread. I'm very confused about this issue, and would appreciate any insight into how gc_limbo is supposed to work.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.