Re: xfrm_state locking regression...
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2008-09-23 04:59:57
On Tue, Sep 23, 2008 at 07:53:18AM +0300, Timo Teräs wrote:
So the idea was to hold X->next from deletion function, not from the walking function. That would be, we always hold deleted->next when there are ongoing walks. And on final _put() we _put() the ->next entry. I think that would work.
Right, this would work. However, now you're again slowing down the relatively fast path of state deletion by moving extra work there from the non-critical dump path. When we optimise code for time, we don't necessarily try to minimise the work overall. We instead try to minimise the amount of work on the critical paths. It's OK to let the other paths such as dumping do a bit more work if it improves the fast paths. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} [off-list ref] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt