]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'rhashtable-next'
authorDavid S. Miller <davem@davemloft.net>
Fri, 9 Jan 2015 03:47:19 +0000 (19:47 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Jan 2015 03:47:19 +0000 (19:47 -0800)
commitb6ea716f0be72feab9bb6399d33518d5c5690167
treea90781d92d4e268479aebe1fb3375ac20cee7f13
parentb750b594a0c9a7927fc64fb80c402625ae3906c4
parent2ec141da9221cbcc82560ac2849d681a7facc8a3
Merge branch 'rhashtable-next'

Ying Xue says:

====================
Involve rhashtable_lookup_insert routine

The series aims to involve rhashtable_lookup_insert() to guarantee
that the process of lookup and insertion of an object from/into hash
table is finished atomically, allowing rhashtable's users not to
introduce an extra lock during search and insertion. For example,
tipc socket is the first user benefiting from this enhancement.

v2 changes:
 - fix the issue of waking up worker thread under a wrong condition in
   patch #2, which is pointed by Thomas.
 - move a comment from rhashtable_inser() to rhashtable_wakeup_worker()
   according to Thomas's suggestion in patch #2.
 - indent the third line of condition statement in
   rhashtable_wakeup_worker() to inner bracket in patch #2.
 - drop patch #3 of v1 series
 - fix an issue of being unable to remove an object from hash table in
   certain special case in patch #4.
 - involve a new patch #5 to avoid unnecessary wakeup for worker queue
   thread
 - involve a new patch #6 to initialize atomic "nelems" variable
 - adjust "nelem_hint" value from 256 to 192 avoiding to unnecessarily
   to shrink hash table from the beginning phase in patch #7.

v1 changes:
 But before rhashtable_lookup_insert() is involved, the following
 optimizations need to be first done:
- simplify rhashtable_lookup by reusing rhashtable_lookup_compare()
- introduce rhashtable_wakeup_worker() to further reduce duplicated
  code in patch #2
- fix an issue in patch #3
- involve rhashtable_lookup_insert(). But in this version, we firstly
  use rhashtable_lookup() to search duplicate key in both old and new
  bucket table; secondly introduce another __rhashtable_insert() helper
  function to reduce the duplicated code between rhashtable_insert()
  and rhashtable_lookup_insert().
- add patch #5 into the series as it depends on above patches. But in
  this version, no change is made comparing with its previous version.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>