hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/include/net/dst_ops.h
....@@ -53,9 +53,11 @@
5353 return percpu_counter_sum_positive(&dst->pcpuc_entries);
5454 }
5555
56
+#define DST_PERCPU_COUNTER_BATCH 32
5657 static inline void dst_entries_add(struct dst_ops *dst, int val)
5758 {
58
- percpu_counter_add(&dst->pcpuc_entries, val);
59
+ percpu_counter_add_batch(&dst->pcpuc_entries, val,
60
+ DST_PERCPU_COUNTER_BATCH);
5961 }
6062
6163 static inline int dst_entries_init(struct dst_ops *dst)