<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><br data-mce-bogus="1"></div><div><span id="zwchr" data-marker="__DIVIDER__">----- On Aug 7, 2020, at 3:24 AM, 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 dir="ltr">Hi, <div>I am new for using rcu and I need some helps for integrating user space rcu into my project for solving performance issue.</div><div>In my project, I create 2 link list - one for free pool, one for using pool.</div><div>Free pool used to hold a segment of memory that no-one use.</div><div>Using pool used to hold a segment of memory that someone use.</div><div>Originally, I use a pthread_spin_lock to protect</div><div>1. alloc memory segment from free pool, and move memory segment from free pool to using pool</div><div>2. free memory segment from using pool, and move memory segment from free pool to using pool
</div></div></blockquote><div><br></div><div>I suspect we would need to know the entire intended design here in order to start<br data-mce-bogus="1"></div><div>a discussion. What operations are doing list traversals ? What operations are doing</div><div>updates ? How frequently are each respective operation done ? Do you intend to</div><div>keep your spin lock to protect concurrent list updates, and if not how do you plan on</div><div>protecting concurrent updates ?<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>What are the performance issues you are experiencing exactly ?<br data-mce-bogus="1"></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><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 dir="ltr"><br><div>For RCU, I change the list_move_tail as following</div><div>cds_list_for_each_entry_safe(cur, next, &(membk_pool->bk_free_pool), entry_pool) {<br></div><div> cds_list_del_rcu(&cur->entry_pool);<br></div><div> urcu_bp_synchronize_rcu();<br></div><div> cds_list_add_tail_rcu(&ret->entry_pool, &(membk_pool->bk_using_pool));</div><div>}</div><br><div>Is it ok to use scenario like this?</div><br><div>Meanwhile, that are some advance list operation API:</div><div>1. list_first_entry</div><div>2. list_first_entry_or_null</div><div>Is it possible to integrate these into current urcu?</div><br><div>Thanks</div><br><br></div>
<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>