mbox series

[v6,0/4] hash: integrate RCU QSBR

Message ID 20201021225006.10438-1-dharmik.thakkar@arm.com (mailing list archive)
Headers
Series hash: integrate RCU QSBR |

Message

Dharmik Thakkar Oct. 21, 2020, 10:50 p.m. UTC
  Integrate RCU QSBR to make it easier for the applications to use lock
free algorithm.

Resource reclamation implementation was split from the original
series, and has already been part of RCU library. Rework the series
to base hash integration on RCU reclamation APIs.

Refer 'Resource reclamation framework for DPDK' available at [1]
to understand various aspects of integrating RCU library
into other libraries.

[1] https://doc.dpdk.org/guides/prog_guide/rcu_lib.html

Introduce a new API rte_hash_rcu_qsbr_add for application to
register a RCU variable that hash library will use.

Functional tests and performance tests are added to cover the
integration with RCU.
---
v6:
 - Update documentation
 - Remove hard-coded value

v5:
 - Enable 'rcu' for Windows

v4:
 - Fix clang compilation issues

v3:
 - Add documentation
 - Add unit tests

v2:
 - Remove defer queue related functions and use resource reclamation
   APIs from the RCU QSBR library instead

 - Remove patch (net/ixgbe: avoid multpile definitions of 'bool')
   from the series as it is already accepted

Dharmik Thakkar (4):
  rcu: build on Windows
  lib/hash: integrate RCU QSBR
  test/hash: replace rte atomic with C11 atomic APIs
  test/hash: add tests for integrated RCU QSBR

 app/test/test_hash.c                   | 390 ++++++++++++++++++++++++-
 app/test/test_hash_readwrite_lf_perf.c | 259 ++++++++++++----
 doc/guides/prog_guide/hash_lib.rst     |  12 +-
 lib/librte_hash/meson.build            |   1 +
 lib/librte_hash/rte_cuckoo_hash.c      | 303 ++++++++++++++-----
 lib/librte_hash/rte_cuckoo_hash.h      |   8 +
 lib/librte_hash/rte_hash.h             |  77 ++++-
 lib/librte_hash/version.map            |   2 +-
 lib/meson.build                        |   1 +
 9 files changed, 920 insertions(+), 133 deletions(-)
  

Comments

David Marchand Oct. 24, 2020, 9:09 a.m. UTC | #1
On Thu, Oct 22, 2020 at 12:51 AM Dharmik Thakkar
<dharmik.thakkar@arm.com> wrote:
>
> Integrate RCU QSBR to make it easier for the applications to use lock
> free algorithm.
>
> Resource reclamation implementation was split from the original
> series, and has already been part of RCU library. Rework the series
> to base hash integration on RCU reclamation APIs.
>
> Refer 'Resource reclamation framework for DPDK' available at [1]
> to understand various aspects of integrating RCU library
> into other libraries.
>
> [1] https://doc.dpdk.org/guides/prog_guide/rcu_lib.html
>
> Introduce a new API rte_hash_rcu_qsbr_add for application to
> register a RCU variable that hash library will use.
>
> Functional tests and performance tests are added to cover the
> integration with RCU.

Fixed some style issues/checkpatch warnings.
The unit test code especially is not really checkpatch compliant,
maybe worth a separate cleanup later.

Removed unrelated changes (like removing empty lines, fixing typos in
unrelated parts).

Series applied, thanks.


Little note: checkpatch now has a check on repeated words better than
a script of mine:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/scripts/checkpatch.pl?id=1a3dcf2e6b35faa1176b9cd8200094fbce16ba19
Probably worth it for people to update their checkpatch.pl.
  
Dharmik Thakkar Oct. 26, 2020, 1:56 p.m. UTC | #2
> On Oct 24, 2020, at 4:09 AM, David Marchand <david.marchand@redhat.com> wrote:
> 
> On Thu, Oct 22, 2020 at 12:51 AM Dharmik Thakkar
> <dharmik.thakkar@arm.com> wrote:
>> 
>> Integrate RCU QSBR to make it easier for the applications to use lock
>> free algorithm.
>> 
>> Resource reclamation implementation was split from the original
>> series, and has already been part of RCU library. Rework the series
>> to base hash integration on RCU reclamation APIs.
>> 
>> Refer 'Resource reclamation framework for DPDK' available at [1]
>> to understand various aspects of integrating RCU library
>> into other libraries.
>> 
>> [1] https://doc.dpdk.org/guides/prog_guide/rcu_lib.html
>> 
>> Introduce a new API rte_hash_rcu_qsbr_add for application to
>> register a RCU variable that hash library will use.
>> 
>> Functional tests and performance tests are added to cover the
>> integration with RCU.
> 
> Fixed some style issues/checkpatch warnings.
> The unit test code especially is not really checkpatch compliant,
> maybe worth a separate cleanup later.
> 
> Removed unrelated changes (like removing empty lines, fixing typos in
> unrelated parts).
> 
> Series applied, thanks.
> 
> 
> Little note: checkpatch now has a check on repeated words better than
> a script of mine:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/scripts/checkpatch.pl?id=1a3dcf2e6b35faa1176b9cd8200094fbce16ba19
> Probably worth it for people to update their checkpatch.pl.
> 

Thank you, David! Appreciate your help.

> 
> -- 
> David Marchand