Thread (7 messages) 7 messages, 5 authors, 2011-12-21

Re: [PATCH] net/flow: remove sleeping and deferral mechanism from flow_cache_flush

From: Timo Teräs <hidden>
Date: 2011-12-20 08:41:44

On 12/20/2011 10:23 AM, Steffen Klassert wrote:
On Tue, Sep 27, 2011 at 03:31:32PM -0400, David Miller wrote:
quoted
From: David Miller <davem@davemloft.net>
Date: Tue, 27 Sep 2011 15:28:36 -0400 (EDT)
quoted
afinfo->garbage_collect is the only other place __xfrm_garbage_collect
is referenced, and that is completely unused and should thus be deleted
(I'll take care of that in net-next).
Nevermind I see how these are referenced directly via xfrm4_policy.c
and xfrm6_policy.c, sigh...
Is there any progress in fixing this issue? I've seen this occasionally
on some of our production systems, so I fixed it for us in the meantime
with the patch below. I could submit this for inclusion if noone else
wants to fix it in a different manner.

------
net: Add a flow_cache_flush_deferred function

flow_cach_flush() might sleep but can be called from
atomic context via the xfrm garbage collector. So add
a flow_cache_flush_deferred() function and use this if
the xfrm garbage colector is invoked from within the
packet path.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Timo Teräs <redacted>

I was first thinking if it made sense to run the local CPUs task
immediately on gc. But since all it does is queue the removed nodes to
the second gc that actually frees the dst's, it doesn't really make a
difference.

So this is probably as good as it gets.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help