Re: [PATCH] net/flow: remove sleeping and deferral mechanism from flow_cache_flush
From: David Miller <davem@davemloft.net>
Date: 2011-09-27 19:28:47
From: David Miller <davem@davemloft.net>
Date: 2011-09-27 19:28:47
From: Madalin Bucur <redacted> Date: Mon, 26 Sep 2011 20:09:16 +0300
flow_cache_flush must not sleep as it can be called in atomic context; removed the schedule_work as the deferred processing lead to the flow cache gc never being actually run under heavy network load Signed-off-by: Madalin Bucur <redacted>
How is this called in an atomic context? The only caller of flow_cache_flush() is __xfrm_garbage_collect() which is only invoked during a NETDEV_DOWN event which ought to be non-atomic. 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). If NETDEV_DOWN notifier is in an atomic context, we need to accomodate or fix that somehow.