Re: [Patch net 01/16] net_sched: introduce a workqueue for RCU callbacks of tc filter

2017-10-27 Thread Eric Dumazet
On Fri, 2017-10-27 at 08:37 -0700, Cong Wang wrote: > On Thu, Oct 26, 2017 at 9:39 PM, Eric Dumazet wrote: > > On Thu, 2017-10-26 at 21:28 -0700, Cong Wang wrote: > >> On Thu, Oct 26, 2017 at 9:05 PM, Eric Dumazet > >> wrote: > >> Paul pointed out the same. > >> > >> As I replied, this rcu_barri

Re: [Patch net 01/16] net_sched: introduce a workqueue for RCU callbacks of tc filter

2017-10-27 Thread Cong Wang
On Fri, Oct 27, 2017 at 4:55 AM, Paul E. McKenney wrote: > > Would this be a good time for me to repeat my suggestion that timers > be used to aggregate the work done in the workqueue handlers, thus > decreasing the number of rcu_barrier() calls done under RTNL? > Yes, but not in this patchset. T

Re: [Patch net 01/16] net_sched: introduce a workqueue for RCU callbacks of tc filter

2017-10-27 Thread Cong Wang
On Thu, Oct 26, 2017 at 9:39 PM, Eric Dumazet wrote: > On Thu, 2017-10-26 at 21:28 -0700, Cong Wang wrote: >> On Thu, Oct 26, 2017 at 9:05 PM, Eric Dumazet wrote: >> Paul pointed out the same. >> >> As I replied, this rcu_barrier() is NOT added by this patchset, it is already >> there in current

Re: [Patch net 01/16] net_sched: introduce a workqueue for RCU callbacks of tc filter

2017-10-27 Thread Paul E. McKenney
On Thu, Oct 26, 2017 at 09:39:26PM -0700, Eric Dumazet wrote: > On Thu, 2017-10-26 at 21:28 -0700, Cong Wang wrote: > > On Thu, Oct 26, 2017 at 9:05 PM, Eric Dumazet > > wrote: > > > On Thu, 2017-10-26 at 18:24 -0700, Cong Wang wrote: > > >> ... > > > > > >> On the other hand, this makes tcf_bloc

Re: [Patch net 01/16] net_sched: introduce a workqueue for RCU callbacks of tc filter

2017-10-26 Thread Eric Dumazet
On Thu, 2017-10-26 at 21:28 -0700, Cong Wang wrote: > On Thu, Oct 26, 2017 at 9:05 PM, Eric Dumazet wrote: > > On Thu, 2017-10-26 at 18:24 -0700, Cong Wang wrote: > >> ... > > > >> On the other hand, this makes tcf_block_put() ugly and > >> harder to understand. Since David and Eric strongly disli

Re: [Patch net 01/16] net_sched: introduce a workqueue for RCU callbacks of tc filter

2017-10-26 Thread Cong Wang
On Thu, Oct 26, 2017 at 9:05 PM, Eric Dumazet wrote: > On Thu, 2017-10-26 at 18:24 -0700, Cong Wang wrote: >> ... > >> On the other hand, this makes tcf_block_put() ugly and >> harder to understand. Since David and Eric strongly dislike >> adding synchronize_rcu(), this is probably the only >> sol

Re: [Patch net 01/16] net_sched: introduce a workqueue for RCU callbacks of tc filter

2017-10-26 Thread Eric Dumazet
On Thu, 2017-10-26 at 18:24 -0700, Cong Wang wrote: > ... > On the other hand, this makes tcf_block_put() ugly and > harder to understand. Since David and Eric strongly dislike > adding synchronize_rcu(), this is probably the only > solution that could make everyone happy. ... > +static void tc

[Patch net 01/16] net_sched: introduce a workqueue for RCU callbacks of tc filter

2017-10-26 Thread Cong Wang
This patch introduces a dedicated workqueue for tc filters so that each tc filter's RCU callback could defer their action destroy work to this workqueue. The helper tcf_queue_work() is introduced for them to use. Because we hold RTNL lock when calling tcf_block_put(), we can not simply flush works