All of lore.kernel.org
 help / color / mirror / Atom feed
* Subject: [PATCH ipsec-next 0/8] xfrm: policy: convert lookups to rcu
@ 2016-08-11 13:17 Florian Westphal
  2016-08-11 13:17 ` [PATCH ipsec-next 1/8] xfrm: policy: use rcu versions for iteration and list add/del Florian Westphal
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Florian Westphal @ 2016-08-11 13:17 UTC (permalink / raw)
  To: netdev

Since commit d188ba86dd07a72eb ("xfrm: add rcu protection to sk->sk_policy[]")
sk_policy can rely on rcu protection.

This change allows to also use rcu in xfrm_policy_lookup_bytype and to
avoid grabbing the read-sie policy lock during lookups.

read-side policy rwlock is converted to pure rcu, then the policy_lock is
changed to a plain spinlock as only write-sides remain.

First few patches do some preparation work, the later ones remove
the read-side locks, last patch converts rwlock to spinlock.

I tested this with rcu debug enabled and simple esp tunnel
forwarding udp packets.

If you have better tests for this please let me know and I can re-run with
that.

Florian Westphal (8):
      xfrm: policy: use rcu versions for iteration and list add/del
      xfrm: policy: prepare policy_bydst hash for rcu lookups
      xfrm: policy: add sequence count to synchronize reads with hash resizes
      xfrm: policy: use atomic_inc_not_zero in rcu section
      xfrm: policy: make xfrm_policy_lookup_bytype lockless
      xfrm: policy: only use rcu in xfrm_sk_policy_lookup
      xfrm: policy: don't acquire policy lock in xfrm_spd_getinfo
      xfrm: policy: convert policy_lock to spinlock

 include/net/netns/xfrm.h |    4 -
 net/xfrm/xfrm_policy.c   |  145 +++++++++++++++++++++++++++--------------------
 2 files changed, 88 insertions(+), 61 deletions(-)

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

end of thread, other threads:[~2016-11-17  8:55 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-11 13:17 Subject: [PATCH ipsec-next 0/8] xfrm: policy: convert lookups to rcu Florian Westphal
2016-08-11 13:17 ` [PATCH ipsec-next 1/8] xfrm: policy: use rcu versions for iteration and list add/del Florian Westphal
2016-08-11 13:17 ` [PATCH ipsec-next 2/8] xfrm: policy: prepare policy_bydst hash for rcu lookups Florian Westphal
2016-08-11 13:17 ` [PATCH ipsec-next 3/8] xfrm: policy: add sequence count to sync with hash resize Florian Westphal
2016-08-11 13:17 ` [PATCH ipsec-next 4/8] xfrm: policy: use atomic_inc_not_zero in rcu section Florian Westphal
2016-08-11 13:17 ` [PATCH ipsec-next 5/8] xfrm: policy: make xfrm_policy_lookup_bytype lockless Florian Westphal
2016-08-11 13:17 ` [PATCH ipsec-next 6/8] xfrm: policy: only use rcu in xfrm_sk_policy_lookup Florian Westphal
2016-11-16 16:43   ` Nicolas Dichtel
2016-11-16 17:30     ` Florian Westphal
2016-11-17  8:55       ` Nicolas Dichtel
2016-08-11 13:17 ` [PATCH ipsec-next 7/8] xfrm: policy: don't acquire policy lock in xfrm_spd_getinfo Florian Westphal
2016-08-11 13:17 ` [PATCH ipsec-next 8/8] xfrm: policy: convert policy_lock to spinlock Florian Westphal
2016-08-24 11:28   ` Steffen Klassert
2016-08-24 11:30     ` Florian Westphal
2016-08-12  8:22 ` Subject: [PATCH ipsec-next 0/8] xfrm: policy: convert lookups to rcu Steffen Klassert
2016-08-22  5:15   ` Steffen Klassert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.