Skip to content

Commit

Permalink
cbq: now_rt removal
Browse files Browse the repository at this point in the history
Now q->now_rt is identical to q->now and is not required anymore.

Signed-off-by: Vasily Averin <vvs@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vasily Averin authored and David S. Miller committed Aug 19, 2014
1 parent 73d0f37 commit 7201c1d
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions net/sched/sch_cbq.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ struct cbq_sched_data {
struct cbq_class *tx_borrowed;
int tx_len;
psched_time_t now; /* Cached timestamp */
psched_time_t now_rt; /* Cached real time */
unsigned int pmask;

struct hrtimer delay_timer;
Expand Down Expand Up @@ -353,12 +352,7 @@ cbq_mark_toplevel(struct cbq_sched_data *q, struct cbq_class *cl)
int toplevel = q->toplevel;

if (toplevel > cl->level && !(qdisc_is_throttled(cl->q))) {
psched_time_t now;
psched_tdiff_t incr;

now = psched_get_time();
incr = now - q->now_rt;
now = q->now + incr;
psched_time_t now = psched_get_time();

do {
if (cl->undertime < now) {
Expand Down Expand Up @@ -956,7 +950,6 @@ cbq_dequeue(struct Qdisc *sch)
cbq_update(q);

q->now = now;
q->now_rt = now;

for (;;) {
q->wd_expires = 0;
Expand Down Expand Up @@ -1212,7 +1205,6 @@ cbq_reset(struct Qdisc *sch)
hrtimer_cancel(&q->delay_timer);
q->toplevel = TC_CBQ_MAXLEVEL;
q->now = psched_get_time();
q->now_rt = q->now;

for (prio = 0; prio <= TC_CBQ_MAXPRIO; prio++)
q->active[prio] = NULL;
Expand Down Expand Up @@ -1396,7 +1388,6 @@ static int cbq_init(struct Qdisc *sch, struct nlattr *opt)
q->delay_timer.function = cbq_undelay;
q->toplevel = TC_CBQ_MAXLEVEL;
q->now = psched_get_time();
q->now_rt = q->now;

cbq_link_class(&q->link);

Expand Down

0 comments on commit 7201c1d

Please sign in to comment.