Re: [PATCH v2] notifier: Fix soft lockup for notifier_call_chain().

2016-06-30 Thread Eric Dumazet
On Fri, 2016-07-01 at 11:06 +0800, Ding Tianhong wrote: > I debug this problem, and found that the __fib6_clean_all() would not > hold the cpu more than 1 second event though there > is a lot of ipv6 address to deal with, but the notifier_chian would > call the ipv6 notifier several times and

Re: [PATCH v2] notifier: Fix soft lockup for notifier_call_chain().

2016-06-30 Thread Eric Dumazet
On Fri, 2016-07-01 at 11:06 +0800, Ding Tianhong wrote: > I debug this problem, and found that the __fib6_clean_all() would not > hold the cpu more than 1 second event though there > is a lot of ipv6 address to deal with, but the notifier_chian would > call the ipv6 notifier several times and

Re: [PATCH v2] notifier: Fix soft lockup for notifier_call_chain().

2016-06-30 Thread Ding Tianhong
On 2016/6/28 14:27, Eric Dumazet wrote: > On Tue, 2016-06-28 at 08:22 +0200, Eric Dumazet wrote: > >> Follow the stack trace and add another cond_resched() where it is needed >> then ? >> >> Lot of this code was written decade ago where nobody expected a root >> user was going to try hard to

Re: [PATCH v2] notifier: Fix soft lockup for notifier_call_chain().

2016-06-30 Thread Ding Tianhong
On 2016/6/28 14:27, Eric Dumazet wrote: > On Tue, 2016-06-28 at 08:22 +0200, Eric Dumazet wrote: > >> Follow the stack trace and add another cond_resched() where it is needed >> then ? >> >> Lot of this code was written decade ago where nobody expected a root >> user was going to try hard to

Re: [PATCH v2] notifier: Fix soft lockup for notifier_call_chain().

2016-06-28 Thread Cong Wang
On Mon, Jun 27, 2016 at 11:22 PM, Eric Dumazet wrote: > Lot of this code was written decade ago where nobody expected a root > user was going to try hard to crash its host ;) +1 Adding cond_resched() to appropriate network notifiers sounds better.

Re: [PATCH v2] notifier: Fix soft lockup for notifier_call_chain().

2016-06-28 Thread Cong Wang
On Mon, Jun 27, 2016 at 11:22 PM, Eric Dumazet wrote: > Lot of this code was written decade ago where nobody expected a root > user was going to try hard to crash its host ;) +1 Adding cond_resched() to appropriate network notifiers sounds better.

Re: [PATCH v2] notifier: Fix soft lockup for notifier_call_chain().

2016-06-28 Thread Eric Dumazet
On Tue, 2016-06-28 at 08:22 +0200, Eric Dumazet wrote: > Follow the stack trace and add another cond_resched() where it is needed > then ? > > Lot of this code was written decade ago where nobody expected a root > user was going to try hard to crash its host ;) > > I did not check if the

Re: [PATCH v2] notifier: Fix soft lockup for notifier_call_chain().

2016-06-28 Thread Eric Dumazet
On Tue, 2016-06-28 at 08:22 +0200, Eric Dumazet wrote: > Follow the stack trace and add another cond_resched() where it is needed > then ? > > Lot of this code was written decade ago where nobody expected a root > user was going to try hard to crash its host ;) > > I did not check if the

Re: [PATCH v2] notifier: Fix soft lockup for notifier_call_chain().

2016-06-28 Thread Eric Dumazet
On Tue, 2016-06-28 at 14:09 +0800, Ding Tianhong wrote: > On 2016/6/28 13:13, Eric Dumazet wrote: > > On Tue, 2016-06-28 at 12:56 +0800, Ding Tianhong wrote: > >> The problem was occurs in my system that a lot of drviers register > >> its own handler to the notifiler call chain for netdev_chain,

Re: [PATCH v2] notifier: Fix soft lockup for notifier_call_chain().

2016-06-28 Thread Eric Dumazet
On Tue, 2016-06-28 at 14:09 +0800, Ding Tianhong wrote: > On 2016/6/28 13:13, Eric Dumazet wrote: > > On Tue, 2016-06-28 at 12:56 +0800, Ding Tianhong wrote: > >> The problem was occurs in my system that a lot of drviers register > >> its own handler to the notifiler call chain for netdev_chain,

Re: [PATCH v2] notifier: Fix soft lockup for notifier_call_chain().

2016-06-28 Thread Ding Tianhong
On 2016/6/28 13:13, Eric Dumazet wrote: > On Tue, 2016-06-28 at 12:56 +0800, Ding Tianhong wrote: >> The problem was occurs in my system that a lot of drviers register >> its own handler to the notifiler call chain for netdev_chain, and >> then create 4095 vlan dev for one nic, and add several

Re: [PATCH v2] notifier: Fix soft lockup for notifier_call_chain().

2016-06-28 Thread Ding Tianhong
On 2016/6/28 13:13, Eric Dumazet wrote: > On Tue, 2016-06-28 at 12:56 +0800, Ding Tianhong wrote: >> The problem was occurs in my system that a lot of drviers register >> its own handler to the notifiler call chain for netdev_chain, and >> then create 4095 vlan dev for one nic, and add several

Re: [PATCH v2] notifier: Fix soft lockup for notifier_call_chain().

2016-06-27 Thread Eric Dumazet
On Tue, 2016-06-28 at 12:56 +0800, Ding Tianhong wrote: > The problem was occurs in my system that a lot of drviers register > its own handler to the notifiler call chain for netdev_chain, and > then create 4095 vlan dev for one nic, and add several ipv6 address > on each one of them, just like

Re: [PATCH v2] notifier: Fix soft lockup for notifier_call_chain().

2016-06-27 Thread Eric Dumazet
On Tue, 2016-06-28 at 12:56 +0800, Ding Tianhong wrote: > The problem was occurs in my system that a lot of drviers register > its own handler to the notifiler call chain for netdev_chain, and > then create 4095 vlan dev for one nic, and add several ipv6 address > on each one of them, just like

[PATCH v2] notifier: Fix soft lockup for notifier_call_chain().

2016-06-27 Thread Ding Tianhong
The problem was occurs in my system that a lot of drviers register its own handler to the notifiler call chain for netdev_chain, and then create 4095 vlan dev for one nic, and add several ipv6 address on each one of them, just like this: for i in `seq 1 4095`; do ip link add link eth0 name

[PATCH v2] notifier: Fix soft lockup for notifier_call_chain().

2016-06-27 Thread Ding Tianhong
The problem was occurs in my system that a lot of drviers register its own handler to the notifiler call chain for netdev_chain, and then create 4095 vlan dev for one nic, and add several ipv6 address on each one of them, just like this: for i in `seq 1 4095`; do ip link add link eth0 name