Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-17 Thread Kirill Tkhai
On 15.11.2017 19:29, Eric W. Biederman wrote: > Kirill Tkhai <ktk...@virtuozzo.com> writes: > >> On 15.11.2017 09:25, Eric W. Biederman wrote: >>> Kirill Tkhai <ktk...@virtuozzo.com> writes: >>> >>>> Curently mutex is used to protect pernet o

Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-16 Thread Kirill Tkhai
On 15.11.2017 19:29, Eric W. Biederman wrote: > Kirill Tkhai <ktk...@virtuozzo.com> writes: > >> On 15.11.2017 09:25, Eric W. Biederman wrote: >>> Kirill Tkhai <ktk...@virtuozzo.com> writes: >>> >>>> Curently mutex is used to protect pernet o

Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-15 Thread Kirill Tkhai
On 15.11.2017 12:51, Kirill Tkhai wrote: > On 15.11.2017 06:19, Eric W. Biederman wrote: >> Kirill Tkhai <ktk...@virtuozzo.com> writes: >> >>> On 14.11.2017 21:39, Cong Wang wrote: >>>> On Tue, Nov 14, 2017 at 5:53 AM, Kirill Tkhai <ktk...@virtuozzo.com

Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-15 Thread Kirill Tkhai
On 15.11.2017 06:19, Eric W. Biederman wrote: > Kirill Tkhai <ktk...@virtuozzo.com> writes: > >> On 14.11.2017 21:39, Cong Wang wrote: >>> On Tue, Nov 14, 2017 at 5:53 AM, Kirill Tkhai <ktk...@virtuozzo.com> wrote: >>>> @@ -406,7 +406,7 @

Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-15 Thread Kirill Tkhai
On 15.11.2017 09:25, Eric W. Biederman wrote: > Kirill Tkhai <ktk...@virtuozzo.com> writes: > >> Curently mutex is used to protect pernet operations list. It makes >> cleanup_net() to execute ->exit methods of the same operations set, >> which was used on t

Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-14 Thread Kirill Tkhai
On 14.11.2017 21:38, Andrei Vagin wrote: > On Tue, Nov 14, 2017 at 09:04:06PM +0300, Kirill Tkhai wrote: >> On 14.11.2017 20:44, Andrei Vagin wrote: >>> On Tue, Nov 14, 2017 at 04:53:33PM +0300, Kirill Tkhai wrote: >>>> Curently mutex is used to protect pe

Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-14 Thread Kirill Tkhai
On 14.11.2017 21:39, Cong Wang wrote: > On Tue, Nov 14, 2017 at 5:53 AM, Kirill Tkhai <ktk...@virtuozzo.com> wrote: >> @@ -406,7 +406,7 @@ struct net *copy_net_ns(unsigned long flags, >> >> get_user_ns(user_ns); >> >> - rv = mut

Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-14 Thread Kirill Tkhai
On 14.11.2017 20:44, Andrei Vagin wrote: > On Tue, Nov 14, 2017 at 04:53:33PM +0300, Kirill Tkhai wrote: >> Curently mutex is used to protect pernet operations list. It makes >> cleanup_net() to execute ->exit methods of the same operations set, >> which was used on the ti

Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-14 Thread Kirill Tkhai
On 14.11.2017 20:07, Eric Dumazet wrote: > On Tue, 2017-11-14 at 16:53 +0300, Kirill Tkhai wrote: >> Curently mutex is used to protect pernet operations list. It makes >> cleanup_net() to execute ->exit methods of the same operations set, >> which was used on the time o

[PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-14 Thread Kirill Tkhai
CPU 2)for i in {1..1}; do unshare -n bash -c exit; done Origin: real 1m24,190s user 0m6,225s sys 0m15,132s Patched: real 0m18,235s (4.6 times faster) user 0m4,544s sys 0m13,796s This patch requires commit 76f8507f7a64 "locking/rwsem: Add down_read_killable()" from Linus tree

[PATCH] net: Protect iterations over net::fib_notifier_ops in fib_seq_sum()

2017-11-14 Thread Kirill Tkhai
rotection. The possible solution could be to use rtnl_lock() in fib_notifier_ops_unregister(), but this adds a possible delay during net namespace creation, so we better use rcu_read_lock() till someone really needs the mutex (if that happens). Signed-off-by: Kirill Tkhai <ktk...@virtuozzo.com>

[PATCH RFC 0/2] net: Iterate over cpu_present_mask during calculation of percpu statistics

2016-08-29 Thread Kirill Tkhai
t i; for(i=0; i<1; i++) do_gia(); } --- Kirill Tkhai (2): net: Implement net_stats callbacks net: Iterate over present cpus only during ipstats calculation include/net/stats.h |9 ++ net/core/Makefile |1 + net/core/stats.c| 83 ++

[PATCH RFC 2/2] net: Iterate over present cpus only during ipstats calculation

2016-08-29 Thread Kirill Tkhai
Use net_stats callback to iterate only present cpus mask. This gives a signify performance growth on configurations with large number of possible cpus. Signed-off-by: Kirill Tkhai <ktk...@virtuozzo.com> --- net/ipv6/addrconf.c |4 +++- net/ipv6/af_inet6.c

[PATCH RFC 1/2] net: Implement net_stats callbacks

2016-08-29 Thread Kirill Tkhai
overhead of summation of percpu statistics on all possible cpus, and iterate only present cpus instead. It may give a signify growth of performance on configurations with big number of possible cpus. Signed-off-by: Kirill Tkhai <ktk...@virtuozzo.com> --- include/net/stats.h |9 ++ ne

[iproute PATCH] Add ip rule save/restore

2015-10-20 Thread Kirill Tkhai
This patch adds save and restore commands to "ip rule" similar the same is made in commit f4ff11e3e298 for "ip route". The feature is useful in checkpoint/restore for container migration, also it may be helpful in some normal situations. Signed-off-by: Kirill Tkhai <ktk..

[PATCH] net_sched: restore mpu xxx handling

2015-07-29 Thread Kirill Tkhai
/1.925 ms # tc class change dev eth0 classid 1:2 parent 1: htb rate 1mbit mpu 1000 # ping -f -c 1000 10.30.22.52 rtt min/avg/max/mdev = 15.352/22.229/38.646/2.212 ms, pipe 3, ipg/ewma 15.999/22.609 ms Signed-off-by: Kirill Tkhai ktk...@odin.com CC: Jesper Dangaard Brouer bro...@redhat.com CC

Re: [PATCH] net_sched: restore mpu xxx handling

2015-07-29 Thread Kirill Tkhai
On 29.07.2015 16:04, Eric Dumazet wrote: On Wed, 2015-07-29 at 14:24 +0300, Kirill Tkhai wrote: commit 56b765b79 (htb: improved accuracy at high rates) broke the mpu xxx handling. This patch restores the mpu xxx handling for htb: # tc class add dev eth0 classid 1:2 parent 1: htb rate 1mbit

net: Missed commit aff09ce303f83bd370772349238482ae422a2341 in stable trees

2015-06-09 Thread Kirill Tkhai
Hi, it looks like the bellow commit is missed in stable kernel versions. In our local 2.6.32 tree without this commit we observed a bridge dropping big packets. The fix is in mainstream kernel now. Please, look if it's need for stable 3.10 kernel etc. commit

<    1   2   3   4   5