<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><span id="zwchr" data-marker="__DIVIDER__">----- On Dec 8, 2016, at 2:53 PM, lttng-dev <lttng-dev@lists.lttng.org> wrote:<br></span></div><div data-marker="__QUOTED_TEXT__"><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 style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1481226442633_2947">All,</div><div id="yui_3_16_0_ym19_1_1481226442633_2947"><br></div><div id="yui_3_16_0_ym19_1_1481226442633_2947">In the documentation for the create_call_rcu_data() call, we have the following description of the URCU_CALL_RCU_RT flag:</div><div id="yui_3_16_0_ym19_1_1481226442633_2947"><br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" id="yui_3_16_0_ym19_1_1481226442633_3052"><div id="yui_3_16_0_ym19_1_1481226442633_2947" dir="ltr"><code id="yui_3_16_0_ym19_1_1481226442633_2989">struct call_rcu_data *create_call_rcu_data(unsigned long flags, int cpu_affinity)</code><span style="font-family: Times; font-size: medium;" id="yui_3_16_0_ym19_1_1481226442633_2990">: Returns a handle that can be passed to the other functions in this list. The </span><code id="yui_3_16_0_ym19_1_1481226442633_2991">flags</code><span style="font-family: Times; font-size: medium;" id="yui_3_16_0_ym19_1_1481226442633_2992"> argument can be zero, or can be </span><code id="yui_3_16_0_ym19_1_1481226442633_2993">URCU_CALL_RCU_RT</code><span style="font-family: Times; font-size: medium;" id="yui_3_16_0_ym19_1_1481226442633_2994"> if the application threads associated with the new callback-invocation thread are to get real-time response from </span><code id="yui_3_16_0_ym19_1_1481226442633_2995">call_rcu()</code><span style="font-family: Times; font-size: medium;" id="yui_3_16_0_ym19_1_1481226442633_2996"> by avoiding the need to call into the kernel to wake up the callback-invocation thread.</span></div><div id="yui_3_16_0_ym19_1_1481226442633_2947" dir="ltr"><span style="font-family: Times; font-size: medium;"><br></span></div></blockquote><div id="yui_3_16_0_ym19_1_1481226442633_3169">So setting "flags" to 0 will simply use the futex mechanism for wakeups. What exactly happens when set to the RT option? Is there something else that needs to be configured from the OS side to make the aforementioned option work correctly?</div></div></blockquote><div><br></div><div>No, it's just that the call rcu worker thread will rely on periodic polling<br data-mce-bogus="1"></div><div>of the call rcu work queue.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></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 style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><br><div id="yui_3_16_0_ym19_1_1481226442633_3170">I'm asking because we're seeing intermittent issues whereby on application startup, the reclamation thread (call_rcu) does exactly one cleanup, but then never does it again. We have the URCU_CALL_RCU_RT flag set. Originally, we thought it was because the updater was not appropriately registered as a reader. But after ensuring that is the case, it still happens in 10% of startups. </div></div></blockquote><div>Which URCU flavor are you using ? You may have a thread stuck as<br></div><div>being a RCU reader forever, which would cause this kind of issue.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>For instance, unbalanced rcu read-side lock/unlock, or blocking on<br></div><div>poll() or other while holding a rcu read-side lock, or blocking on<br data-mce-bogus="1"></div><div>pthread_join() while holding rcu read-side lock...<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>And if you use the QSBR flavor, remember that registered threads<br data-mce-bogus="1"></div><div>are by default in read-side. So you need to mark them as explicitly<br data-mce-bogus="1"></div><div>"offline" whenever you do any blocking op (e.g. poll(), blocking read(),<br data-mce-bogus="1"></div><div>pthread_join....).<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></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 style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><br><div id="yui_3_16_0_ym19_1_1481226442633_3171">Lastly, we wonder why it would even work correctly *at all* when we failed to register the updater as a reader thread.</div></div></blockquote><div>I don't understand the context of this question. Can you provide more info ?<br></div><div><br data-mce-bogus="1"></div><div>Thanks,<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Mathieu<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></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;"><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 data-marker="__SIG_POST__">-- <br></div><div>Mathieu Desnoyers<br>EfficiOS Inc.<br>http://www.efficios.com</div></div></body></html>