[lttng-dev] URCU use cases
Ilya Mirsky
ilya.mirsky at gmail.com
Thu Sep 11 05:22:09 EDT 2014
That's what I thought, thanks for confirming my understanding.
I still miss something about URCU's implementation.
How would a code that operates on multiple structures look like,
as all the api functions are context free (read_lock(), rcu_synchronize(),
etc. have no parameters)?
Thanks,
Ilya
On Sat, Sep 6, 2014 at 4:18 PM, Michel Dagenais <michel.dagenais at polymtl.ca>
wrote:
> Studying the API of URCU it seems that it's mostly intended for link-based
> data structures, such a lists. Suppose I have a large struct that is often
> accessed by many readers, and some writers that occasionally update few
> fields each time. If I understand correctly, using URCU, the writers would
> have to make a copy of the struct on each write, make the changes, and then
> publish the updated version. This is wasteful for small updates to a large
> struct.
>
> RCU / URCU is efficient for read-mostly structures. In that case, copying
> a large struct may not be such a problem since it is infrequent. You also
> have the option of splitting the structure into smaller independently
> updated ones.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20140911/1a14183a/attachment-0001.html>
More information about the lttng-dev
mailing list