aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-08-24 03:54:22 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 15:08:47 -0700
commita47f0ce05ae12ce9acad62896ff703175764104e (patch)
tree7d2d64d86ca869b2039ffe8ec066a5daa87b8673 /scripts
parent1c0953997567b22e32fdf85d3b4bc0f2461fd161 (diff)
[XFRM]: Kill excessive refcounting of xfrm_state objects.
The refcounting done for timers and hash table insertions are just wasted cycles. We can eliminate all of this refcounting because: 1) The implicit refcount when the xfrm_state object is active will always be held while the object is in the hash tables. We never kfree() the xfrm_state until long after we've made sure that it has been unhashed. 2) Timers are even easier. Once we mark that x->km.state as anything other than XFRM_STATE_VALID (__xfrm_state_delete sets it to XFRM_STATE_DEAD), any timer that fires will do nothing and return without rearming the timer. Therefore we can defer the del_timer calls until when the object is about to be freed up during GC. We have to use del_timer_sync() and defer it to GC because we can't do a del_timer_sync() while holding x->lock which all callers of __xfrm_state_delete hold. This makes SA changes even more light-weight. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions