netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/3] remove nl_sk_hash_lock from netlink socket
@ 2015-01-12  6:52 Ying Xue
  2015-01-12  6:52 ` [PATCH net-next v2 1/3] rhashtable: involve rhashtable_lookup_compare_insert routine Ying Xue
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Ying Xue @ 2015-01-12  6:52 UTC (permalink / raw)
  To: tgraf; +Cc: davem, netdev

After tipc socket successfully avoids the involvement of an extra lock
with rhashtable_lookup_insert(), it's possible for netlink socket to
remove its hash socket lock now. But as netlink socket needs a compare
function to look for an object, we first introduce a new function
called rhashtable_lookup_compare_insert() in commit #1 which is
implemented based on original rhashtable_lookup_insert(). We
subsequently remove nl_sk_hash_lock from netlink socket with the new
introduced function in commit #2. Lastly, as Thomas requested, we add
commit #3 to indicate the implementation of what the grow and shrink
decision function must enforce min/max shift.

v2:
 As Thomas pointed out, there was a race between checking portid and
 then setting it in commit #2. Now use socket lock to make the process
 of both checking and setting portid atomic, and then eliminate the
 race.

Ying Xue (3):
  rhashtable: involve rhashtable_lookup_compare_insert routine
  netlink: eliminate nl_sk_hash_lock
  rhashtable: add a note for grow and shrink decision functions

 include/linux/rhashtable.h |    9 +++++++++
 lib/rhashtable.c           |   42 ++++++++++++++++++++++++++++++++++++++++--
 net/netlink/af_netlink.c   |   33 ++++++++++++++++++++-------------
 net/netlink/af_netlink.h   |    1 -
 net/netlink/diag.c         |   10 +++++-----
 5 files changed, 74 insertions(+), 21 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-13 19:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-12  6:52 [PATCH net-next v2 0/3] remove nl_sk_hash_lock from netlink socket Ying Xue
2015-01-12  6:52 ` [PATCH net-next v2 1/3] rhashtable: involve rhashtable_lookup_compare_insert routine Ying Xue
2015-01-12  6:52 ` [PATCH net-next v2 2/3] netlink: eliminate nl_sk_hash_lock Ying Xue
2015-01-13  0:08   ` Thomas Graf
2015-01-12  6:52 ` [PATCH net-next v2 3/3] rhashtable: add a note for grow and shrink decision functions Ying Xue
2015-01-13 19:01 ` [PATCH net-next v2 0/3] remove nl_sk_hash_lock from netlink socket David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).