Re: [PATCH net-next] wireguard: Using kfree_rcu() to simplify the code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Wei,

On Thu, Dec 12, 2019 at 1:03 PM Wei Yongjun <weiyongjun1@xxxxxxxxxx> 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@xxxxxxxxxx>

Signed-off-by: Jason A. Donenfeld <Jason@xxxxxxxxx>

I've queued this up as:
https://git.kernel.org/pub/scm/linux/kernel/git/zx2c4/wireguard-linux.git/commit/?id=2ddefeb5872878fe2fffb83664c02bd104fb1a52
I'll submit this to net-next next week as part of a cleanup series I'm
preparing.

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.

Regards,
Jason



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux