<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">That's what I thought, thanks for confirming my understanding.</div><div class="gmail_quote">I still miss something about URCU's implementation.</div><div class="gmail_quote">How would a code that operates on multiple structures look like,</div><div class="gmail_quote">as all the api functions are context free (read_lock(), rcu_synchronize(), etc. have no parameters)?</div><div class="gmail_quote"><br></div><div class="gmail_quote">Thanks,</div><div class="gmail_quote">Ilya</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Sat, Sep 6, 2014 at 4:18 PM, Michel Dagenais <span dir="ltr"><<a href="mailto:michel.dagenais@polymtl.ca" target="_blank">michel.dagenais@polymtl.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000"><span class=""><blockquote style="color:rgb(0,0,0);font-family:Helvetica,Arial,sans-serif;font-size:12pt;border-left-width:2px;border-left-style:solid;border-left-color:rgb(16,16,255);margin-left:5px;padding-left:5px;font-weight:normal;font-style:normal;text-decoration:none"><div dir="ltr"><div></div><div>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.</div></div></blockquote></span><font face="Helvetica, Arial, sans-serif">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.</font><blockquote style="color:rgb(0,0,0);font-family:Helvetica,Arial,sans-serif;font-size:12pt;border-left-width:2px;border-left-style:solid;border-left-color:rgb(16,16,255);margin-left:5px;padding-left:5px;font-weight:normal;font-style:normal;text-decoration:none"><div dir="ltr"><div></div></div></blockquote></div></div></blockquote></div><br></div></div>