Re: [PATCH 2/3] net: Make cleanup_list and net::cleanup_list of llist type

2018-02-21 Thread Kirill Tkhai
On 20.02.2018 22:42, Cong Wang wrote: > On Mon, Feb 19, 2018 at 1:58 AM, Kirill Tkhai wrote: >> void __put_net(struct net *net) >> { >> /* Cleanup the network namespace in process context */ >> - unsigned long flags; >> - >> -

Re: [PATCH 2/3] net: Make cleanup_list and net::cleanup_list of llist type

2018-02-20 Thread Cong Wang
On Mon, Feb 19, 2018 at 1:58 AM, Kirill Tkhai wrote: > void __put_net(struct net *net) > { > /* Cleanup the network namespace in process context */ > - unsigned long flags; > - > - spin_lock_irqsave(_list_lock, flags); > - list_add(>cleanup_list,

[PATCH 2/3] net: Make cleanup_list and net::cleanup_list of llist type

2018-02-19 Thread Kirill Tkhai
This simplifies cleanup queueing and makes cleanup lists to use llist primitives. Since llist has its own cmpxchg() ordering, cleanup_list_lock is not more need. Also, struct llist_node is smaller, than struct list_head, so we save some bytes in struct net with this patch. Signed-off-by: Kirill