[PATCH net-next] wireguard: Using kfree_rcu() to simplify the code
Jason A. Donenfeld
Jason at zx2c4.com
Thu Dec 12 14:18:39 CET 2019
On Thu, Dec 12, 2019 at 1:03 PM Wei Yongjun <weiyongjun1 at huawei.com> wrote:
> The callback function of call_rcu() just calls a kfree(), so we
> can use kfree_rcu() instead of call_rcu() + callback function.
> Signed-off-by: Wei Yongjun <weiyongjun1 at huawei.com>
Signed-off-by: Jason A. Donenfeld <Jason at zx2c4.com>
I've queued this up as:
I'll submit this to net-next next week as part of a cleanup series I'm
In case you're curious, this originally was call_rcu_bh, as there was
no kfree_rcu_bh function. Since the _bh functions got unified a few
releases ago, this was changed to just a simple call_rcu, but
apparently missed the optimization you've done here using kfree_rcu.
So thanks for the patch.
More information about the WireGuard