gen estimator has been rewritten in commit 1c0d32fde5bd ("net_sched: gen_estimator: complete rewrite of rate estimators"), the caller is no longer needed to wait for a grace period. So this patch gets rid of it. This also completely closes a race condition between action free path and filter chain add/remove path for the following patch. Because otherwise the nested RCU callback can't be caught by rcu_barrier(). Please see also the comments in code.
Showing the changes to include/net (1 of 2 files). Show all
Unified · Split
| @@ -34,7 +34,6 @@ struct tc_action { · 33 unmodified lines | |||
| 34 | struct gnet_stats_queue tcfa_qstats; | 34 | struct gnet_stats_queue tcfa_qstats; |
| 35 | struct net_rate_estimator __rcu *tcfa_rate_est; | 35 | struct net_rate_estimator __rcu *tcfa_rate_est; |
| 36 | spinlock_t tcfa_lock; | 36 | spinlock_t tcfa_lock; |
| 37 | struct rcu_head tcfa_rcu; | ||
| 38 | struct gnet_stats_basic_cpu __percpu *cpu_bstats; | 37 | struct gnet_stats_basic_cpu __percpu *cpu_bstats; |
| 39 | struct gnet_stats_queue __percpu *cpu_qstats; | 38 | struct gnet_stats_queue __percpu *cpu_qstats; |
| 40 | struct tc_cookie *act_cookie; | 39 | struct tc_cookie *act_cookie; |
| @@ -50,7 +49,6 @@ struct tc_action { · 9 unmodified lines | |||
| 50 | #define tcf_qstats common.tcfa_qstats | 49 | #define tcf_qstats common.tcfa_qstats |
| 51 | #define tcf_rate_est common.tcfa_rate_est | 50 | #define tcf_rate_est common.tcfa_rate_est |
| 52 | #define tcf_lock common.tcfa_lock | 51 | #define tcf_lock common.tcfa_lock |
| 53 | #define tcf_rcu common.tcfa_rcu | ||
| 54 | 52 | ||
| 55 | /* Update lastuse only if needed, to avoid dirtying a cache line. | 53 | /* Update lastuse only if needed, to avoid dirtying a cache line. |
| 56 | * We use a temp variable to avoid fetching jiffies twice. | 54 | * We use a temp variable to avoid fetching jiffies twice. |