[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100320131340.GB2243@gondor.apana.org.au>
Date: Sat, 20 Mar 2010 21:13:40 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Timo Teräs <timo.teras@....fi>
Cc: netdev@...r.kernel.org, Neil Horman <nhorman@...driver.com>
Subject: Re: [PATCH] xfrm: implement basic garbage collection for bundles
On Sat, Mar 20, 2010 at 02:54:31PM +0200, Timo Teräs wrote:
>
> Those are more or less timer based too. I guess it would be
> better to put to dst core's function then. It can see hanging
> refs, and call xfrm gc in that case.
The IPv4 one appears to be invoked from dst_alloc just like
xfrm.
> To even minimize that it would help a lot if xfrm_bundle_ok
> could release (or swap to dummies) the referenced dst->route
> and dst->child entries. xfrm_bundle_ok is mostly called for
> all bundles regularly by xfrm_find_bundle before new ones are
> created.
Yes I agree that's what we should do once your other patch is
applied.
So every top-level xfrm_dst that's not referenced by some user
should sit in the flow cache. When it's needed and we find it
to be stale we kick it out of the cache and free it along with
the rest of its constituents.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists