RE: [patch net v2 1/4] net/sched: Change tc_action refcnt and bindcnt to atomic

2017-10-23 Thread Chris Mi
> -Original Message- > From: Cong Wang [mailto:xiyou.wangc...@gmail.com] > Sent: Monday, October 23, 2017 11:40 PM > To: Chris Mi > Cc: Jamal Hadi Salim ; Linux Kernel Network Developers > ; Lucas Bates ; Jiri Pirko > ; David Miller > Subject: Re: [patch net v

Re: [patch net v2 1/4] net/sched: Change tc_action refcnt and bindcnt to atomic

2017-10-23 Thread Cong Wang
On Sun, Oct 22, 2017 at 7:47 PM, Chris Mi wrote: > > It seems it is not easy to discard call_rcu(). I'm afraid even if we have a > final solution > without call_rcu(), it is not mature at the beginning as well. I mean we also > need time Why do you believe it is not easy? RTNL lock is already

RE: [patch net v2 1/4] net/sched: Change tc_action refcnt and bindcnt to atomic

2017-10-22 Thread Chris Mi
> -Original Message- > From: Cong Wang [mailto:xiyou.wangc...@gmail.com] > Sent: Friday, October 20, 2017 11:00 AM > To: Jamal Hadi Salim > Cc: Chris Mi ; Linux Kernel Network Developers > ; Lucas Bates ; Jiri Pirko > ; David Miller > Subject: Re: [patch net v

Re: [patch net v2 1/4] net/sched: Change tc_action refcnt and bindcnt to atomic

2017-10-19 Thread Cong Wang
On Thu, Oct 19, 2017 at 7:21 AM, Jamal Hadi Salim wrote: > On 17-10-18 12:43 PM, Cong Wang wrote: >> >> On Tue, Oct 17, 2017 at 6:03 PM, Chris Mi wrote: -Original Message- > > >> >> You listed 3 problems, and you think they are 3 different ones, here >> I argue problem 3 (using

Re: [patch net v2 1/4] net/sched: Change tc_action refcnt and bindcnt to atomic

2017-10-19 Thread Jamal Hadi Salim
On 17-10-18 12:43 PM, Cong Wang wrote: On Tue, Oct 17, 2017 at 6:03 PM, Chris Mi wrote: -Original Message- You listed 3 problems, and you think they are 3 different ones, here I argue problem 3 (using RCU callbacks) is the cause of problem 1 (refcnt not atomic). This is why I mentio

Re: [patch net v2 1/4] net/sched: Change tc_action refcnt and bindcnt to atomic

2017-10-18 Thread Cong Wang
Lucas Bates ; Jiri Pirko >> ; David Miller >> Subject: Re: [patch net v2 1/4] net/sched: Change tc_action refcnt and >> bindcnt to atomic >> >> On Mon, Oct 16, 2017 at 6:14 PM, Chris Mi wrote: >> > I don't think this bug were introduced by above two commit

RE: [patch net v2 1/4] net/sched: Change tc_action refcnt and bindcnt to atomic

2017-10-17 Thread Chris Mi
> -Original Message- > From: Cong Wang [mailto:xiyou.wangc...@gmail.com] > Sent: Tuesday, October 17, 2017 11:53 PM > To: Chris Mi > Cc: Linux Kernel Network Developers ; Jamal Hadi > Salim ; Lucas Bates ; Jiri Pirko > ; David Miller > Subject: Re: [patch net v

Re: [patch net v2 1/4] net/sched: Change tc_action refcnt and bindcnt to atomic

2017-10-17 Thread Cong Wang
On Mon, Oct 16, 2017 at 6:14 PM, Chris Mi wrote: > I don't think this bug were introduced by above two commits only. > Actually, this bug were introduced by several commits, at least the following: > 1. refcnt and bindcnt are not atomic Nope, it is perfectly okay with non-atomic as long as no par

RE: [patch net v2 1/4] net/sched: Change tc_action refcnt and bindcnt to atomic

2017-10-16 Thread Chris Mi
> -Original Message- > From: Cong Wang [mailto:xiyou.wangc...@gmail.com] > Sent: Tuesday, October 17, 2017 1:06 AM > To: Chris Mi > Cc: Linux Kernel Network Developers ; Jamal Hadi > Salim ; Lucas Bates ; Jiri Pirko > ; David Miller > Subject: Re: [patch net v

Re: [patch net v2 1/4] net/sched: Change tc_action refcnt and bindcnt to atomic

2017-10-16 Thread Cong Wang
On Mon, Oct 16, 2017 at 4:18 AM, Chris Mi wrote: > If many filters share the same action. That action's refcnt and bindcnt > could be manipulated by many RCU callbacks at the same time. This patch > makes these operations atomic. Actually I have been thinking about removing these RCU callbacks, t