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 f2600cf02b
("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>
This commit is contained in:

committed by
David S. Miller

parent
42117927ca
commit
45f50bed1d
@@ -583,7 +583,6 @@ static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer)
|
||||
timer);
|
||||
|
||||
rcu_read_lock();
|
||||
qdisc_unthrottled(wd->qdisc);
|
||||
__netif_schedule(qdisc_root(wd->qdisc));
|
||||
rcu_read_unlock();
|
||||
|
||||
@@ -598,15 +597,12 @@ void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc)
|
||||
}
|
||||
EXPORT_SYMBOL(qdisc_watchdog_init);
|
||||
|
||||
void qdisc_watchdog_schedule_ns(struct qdisc_watchdog *wd, u64 expires, bool throttle)
|
||||
void qdisc_watchdog_schedule_ns(struct qdisc_watchdog *wd, u64 expires)
|
||||
{
|
||||
if (test_bit(__QDISC_STATE_DEACTIVATED,
|
||||
&qdisc_root_sleeping(wd->qdisc)->state))
|
||||
return;
|
||||
|
||||
if (throttle)
|
||||
qdisc_throttled(wd->qdisc);
|
||||
|
||||
if (wd->last_expires == expires)
|
||||
return;
|
||||
|
||||
@@ -620,7 +616,6 @@ EXPORT_SYMBOL(qdisc_watchdog_schedule_ns);
|
||||
void qdisc_watchdog_cancel(struct qdisc_watchdog *wd)
|
||||
{
|
||||
hrtimer_cancel(&wd->timer);
|
||||
qdisc_unthrottled(wd->qdisc);
|
||||
}
|
||||
EXPORT_SYMBOL(qdisc_watchdog_cancel);
|
||||
|
||||
|
Reference in New Issue
Block a user