diff options
author | Eric Dumazet <edumazet@google.com> | 2016-06-10 19:41:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-11 02:58:21 -0400 |
commit | 45f50bed1d808794e514e9eed0e579a8756ce2ba (patch) | |
tree | 05d9f30419d6a5ef9b503487661959ef29c2fec5 /include/net/sch_generic.h | |
parent | 42117927cab5a13192ecc227bea19da5059ffc6c (diff) |
net_sched: remove generic throttled management
__QDISC_STATE_THROTTLED bit manipulation is rather expensive
for HTB and few others.
I already removed it for sch_fq in commit f2600cf02b5b
("net: sched: avoid costly atomic operation in fq_dequeue()")
and so far nobody complained.
When one ore more packets are stuck in one or more throttled
HTB class, a htb dequeue() performs two atomic operations
to clear/set __QDISC_STATE_THROTTLED bit, while root qdisc
lock is held.
Removing this pair of atomic operations bring me a 8 % performance
increase on 200 TCP_RR tests, in presence of throttled classes.
This patch has no side effect, since nothing actually uses
disc_is_throttled() anymore.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r-- | include/net/sch_generic.h | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 9f3581980c15..9a0d177884c6 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -26,7 +26,6 @@ struct qdisc_rate_table { | |||
26 | enum qdisc_state_t { | 26 | enum qdisc_state_t { |
27 | __QDISC_STATE_SCHED, | 27 | __QDISC_STATE_SCHED, |
28 | __QDISC_STATE_DEACTIVATED, | 28 | __QDISC_STATE_DEACTIVATED, |
29 | __QDISC_STATE_THROTTLED, | ||
30 | }; | 29 | }; |
31 | 30 | ||
32 | struct qdisc_size_table { | 31 | struct qdisc_size_table { |
@@ -125,21 +124,6 @@ static inline int qdisc_avail_bulklimit(const struct netdev_queue *txq) | |||
125 | #endif | 124 | #endif |
126 | } | 125 | } |
127 | 126 | ||
128 | static inline bool qdisc_is_throttled(const struct Qdisc *qdisc) | ||
129 | { | ||
130 | return test_bit(__QDISC_STATE_THROTTLED, &qdisc->state) ? true : false; | ||
131 | } | ||
132 | |||
133 | static inline void qdisc_throttled(struct Qdisc *qdisc) | ||
134 | { | ||
135 | set_bit(__QDISC_STATE_THROTTLED, &qdisc->state); | ||
136 | } | ||
137 | |||
138 | static inline void qdisc_unthrottled(struct Qdisc *qdisc) | ||
139 | { | ||
140 | clear_bit(__QDISC_STATE_THROTTLED, &qdisc->state); | ||
141 | } | ||
142 | |||
143 | struct Qdisc_class_ops { | 127 | struct Qdisc_class_ops { |
144 | /* Child qdisc manipulation */ | 128 | /* Child qdisc manipulation */ |
145 | struct netdev_queue * (*select_queue)(struct Qdisc *, struct tcmsg *); | 129 | struct netdev_queue * (*select_queue)(struct Qdisc *, struct tcmsg *); |