diff options
| author | Eric Dumazet <edumazet@google.com> | 2014-10-04 13:11:31 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-10-06 00:55:10 -0400 |
| commit | f2600cf02b5b59aaee082c3485b7f01fc7f7b70c (patch) | |
| tree | f38d692c3f706ead3d0cfd77b216fbd629a22964 /include | |
| parent | 681d2421e1135b95f5cd9d16fe10eac7f570a9f2 (diff) | |
net: sched: avoid costly atomic operation in fq_dequeue()
Standard qdisc API to setup a timer implies an atomic operation on every
packet dequeue : qdisc_unthrottled()
It turns out this is not really needed for FQ, as FQ has no concept of
global qdisc throttling, being a qdisc handling many different flows,
some of them can be throttled, while others are not.
Fix is straightforward : add a 'bool throttle' to
qdisc_watchdog_schedule_ns(), and remove calls to qdisc_unthrottled()
in sch_fq.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/pkt_sched.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index e4b3c828c1c2..27a33833ff4a 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
| @@ -65,12 +65,12 @@ struct qdisc_watchdog { | |||
| 65 | }; | 65 | }; |
| 66 | 66 | ||
| 67 | void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc); | 67 | void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc); |
| 68 | void qdisc_watchdog_schedule_ns(struct qdisc_watchdog *wd, u64 expires); | 68 | void qdisc_watchdog_schedule_ns(struct qdisc_watchdog *wd, u64 expires, bool throttle); |
| 69 | 69 | ||
| 70 | static inline void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, | 70 | static inline void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, |
| 71 | psched_time_t expires) | 71 | psched_time_t expires) |
| 72 | { | 72 | { |
| 73 | qdisc_watchdog_schedule_ns(wd, PSCHED_TICKS2NS(expires)); | 73 | qdisc_watchdog_schedule_ns(wd, PSCHED_TICKS2NS(expires), true); |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | void qdisc_watchdog_cancel(struct qdisc_watchdog *wd); | 76 | void qdisc_watchdog_cancel(struct qdisc_watchdog *wd); |
