<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<style type="text/css">.style1 {font-family: "Times New Roman";}</style></head><body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>fyi, see below.</p>
<p><br>
</p>
<p>I hope I posed the question correctly.<br>
</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Mathieu Desnoyers <mathieu.desnoyers@efficios.com><br>
<b>Sent:</b> Monday, October 31, 2016 9:50 AM<br>
<b>To:</b> Charles Jacobsen<br>
<b>Cc:</b> lttng-dev<br>
<b>Subject:</b> Re: [lttng-dev] Do updaters of a cds_lfht need to be synchronized?</font>
<div> </div>
</div>
<div>
<div style="font-family:arial,helvetica,sans-serif; font-size:12pt; color:#000000">
<div><br>
</div>
<div><span id="zwchr">----- On Oct 28, 2016, at 11:40 AM, Charles Jacobsen <charles.jacobsen@primarydata.com> wrote:<br>
</span></div>
<div>
<blockquote style="border-left:2px solid #1010FF; margin-left:5px; padding-left:5px; color:#000; font-weight:normal; font-style:normal; text-decoration:none; font-family:Helvetica,Arial,sans-serif; font-size:12pt">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>The documentation for the lock-free hash table does not mention anything about synchronizing updaters (e.g., with a lock):</p>
<p><br>
</p>
<p><a href="https://lwn.net/Articles/573431/" class="OWAAutoLink" id="LPlnk860374" target="_blank" previewremoved="true">https://lwn.net/Articles/573431/</a><br>
</p>
<p><a href="https://lwn.net/Articles/573432/" class="OWAAutoLink" id="LPlnk417850" target="_blank" previewremoved="true">https://lwn.net/Articles/573432/</a><br>
</p>
<p><br>
</p>
<p>The source for rculfhash (== cds_lfht?) also mentions in the comments that add and remove are lock free:<br>
</p>
<p><br>
</p>
<p><a href="https://github.com/urcu/userspace-rcu/blob/master/src/rculfhash.c" class="OWAAutoLink" id="LPlnk562362" target="_blank" previewremoved="true">https://github.com/urcu/userspace-rcu/blob/master/src/rculfhash.c</a><br>
</p>
<p><br>
</p>
<p>Is it safe to assume that cds_lfht_add, cds_lfht_add_unique, and so on, *only* require a surrounding rcu read lock/unlock?</p>
<p><br>
</p>
<p>"lock free" is part of the name, so I would assume the answer is "yes".</p>
</div>
</blockquote>
<div>Yes, this assumption is correct.<br>
</div>
<div><br>
</div>
<div>Thanks,<br>
</div>
<div><br>
</div>
<div>Mathieu<br>
</div>
<div><br>
</div>
<div><br>
</div>
<blockquote style="border-left:2px solid #1010FF; margin-left:5px; padding-left:5px; color:#000; font-weight:normal; font-style:normal; text-decoration:none; font-family:Helvetica,Arial,sans-serif; font-size:12pt">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p><br>
</p>
<p><br>
</p>
<p>Thank you.<br>
</p>
</div>
<br>
<br>
<p style="font-family:Verdana; font-size:10pt; color:#666666"><b>Disclaimer</b></p>
<p style="font-family:Verdana; font-size:8pt; color:#666666">The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you
are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.<br>
</p>
<br>
_______________________________________________<br>
lttng-dev mailing list<br>
lttng-dev@lists.lttng.org<br>
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev<br>
</blockquote>
</div>
<div><br>
</div>
<div>-- <br>
</div>
<div>Mathieu Desnoyers<br>
EfficiOS Inc.<br>
http://www.efficios.com</div>
</div>
</div>
</div>
</div>
<br /><br /><p style="font-family: Verdana; font-size:10pt; color:#666666;"><b>Disclaimer</b></p><p style="font-family: Verdana; font-size:8pt; color:#666666;">The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.<br /></p></body></html>