mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
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>
This commit is contained in:
parent
681d2421e1
commit
f2600cf02b
4 changed files with 9 additions and 9 deletions
|
@ -65,12 +65,12 @@ struct qdisc_watchdog {
|
|||
};
|
||||
|
||||
void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc);
|
||||
void qdisc_watchdog_schedule_ns(struct qdisc_watchdog *wd, u64 expires);
|
||||
void qdisc_watchdog_schedule_ns(struct qdisc_watchdog *wd, u64 expires, bool throttle);
|
||||
|
||||
static inline void qdisc_watchdog_schedule(struct qdisc_watchdog *wd,
|
||||
psched_time_t expires)
|
||||
{
|
||||
qdisc_watchdog_schedule_ns(wd, PSCHED_TICKS2NS(expires));
|
||||
qdisc_watchdog_schedule_ns(wd, PSCHED_TICKS2NS(expires), true);
|
||||
}
|
||||
|
||||
void qdisc_watchdog_cancel(struct qdisc_watchdog *wd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue