RE: Get rid of RCU callbacks in TC filters?

2017-10-23 Thread David Laight
From: Cong Wang > Sent: 20 October 2017 21:52 > To: Paul E. McKenney > Cc: Jamal Hadi Salim; Chris Mi; Linux Kernel Network Developers; Daniel > Borkmann; Eric Dumazet; David > Miller; Jiri Pirko > Subject: Re: Get rid of RCU callbacks in TC filters? > > On Fri, Oct 2

Re: Get rid of RCU callbacks in TC filters?

2017-10-20 Thread Cong Wang
On Fri, Oct 20, 2017 at 1:31 PM, Cong Wang wrote: > Actually, I just tried this approach, this way makes the core tc filter > code harder to wait for flying callbacks, currently rcu_barrier() is > enough, with one more schedule_work() added we probably > need flush_workqueue()... Huh, this also me

Re: Get rid of RCU callbacks in TC filters?

2017-10-20 Thread Cong Wang
On Fri, Oct 20, 2017 at 9:56 AM, Paul E. McKenney wrote: > On Thu, Oct 19, 2017 at 08:26:01PM -0700, Cong Wang wrote: >> On Wed, Oct 18, 2017 at 12:35 PM, Paul E. McKenney >> wrote: >> > 5) Keep call_rcu(), but have the RCU callback schedule a workqueue. >> > The workqueue could then use blocking

Re: Get rid of RCU callbacks in TC filters?

2017-10-20 Thread Paul E. McKenney
On Thu, Oct 19, 2017 at 08:26:01PM -0700, Cong Wang wrote: > On Wed, Oct 18, 2017 at 12:35 PM, Paul E. McKenney > wrote: > > On Wed, Oct 18, 2017 at 10:36:28AM -0700, Cong Wang wrote: > >> Hi, all > >> > >> Recently, the RCU callbacks used in TC filters and TC actions keep > >> drawing my attentio

Re: Get rid of RCU callbacks in TC filters?

2017-10-19 Thread Cong Wang
On Wed, Oct 18, 2017 at 12:35 PM, Paul E. McKenney wrote: > On Wed, Oct 18, 2017 at 10:36:28AM -0700, Cong Wang wrote: >> Hi, all >> >> Recently, the RCU callbacks used in TC filters and TC actions keep >> drawing my attention, they introduce at least 4 race condition bugs: >> >> 1. A simple one f

Re: Get rid of RCU callbacks in TC filters?

2017-10-19 Thread Cong Wang
On Thu, Oct 19, 2017 at 8:34 AM, John Fastabend wrote: > > My take on this would be to stay with the current RCU callbacks and try > to simplify the implementation. Falling back to sync operations seems > like a step backwards to me. I know update/delete of filters is currently > a pain point for

Re: Get rid of RCU callbacks in TC filters?

2017-10-19 Thread John Fastabend
On 10/18/2017 12:35 PM, Paul E. McKenney wrote: > On Wed, Oct 18, 2017 at 10:36:28AM -0700, Cong Wang wrote: >> Hi, all >> >> Recently, the RCU callbacks used in TC filters and TC actions keep >> drawing my attention, they introduce at least 4 race condition bugs: >> >> 1. A simple one fixed by Dan

Re: Get rid of RCU callbacks in TC filters?

2017-10-18 Thread Paul E. McKenney
On Wed, Oct 18, 2017 at 10:36:28AM -0700, Cong Wang wrote: > Hi, all > > Recently, the RCU callbacks used in TC filters and TC actions keep > drawing my attention, they introduce at least 4 race condition bugs: > > 1. A simple one fixed by Daniel: > > commit c78e1746d3ad7d548bdf3fe491898cc453911