diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-09-04 08:44:16 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-04 08:44:16 -0400 |
commit | 695a461296e5df148c99ac087b9e1cb380f4db15 (patch) | |
tree | 951893036fdc0b7bae0e17bc739ac8ffe909781d /net/sched | |
parent | c7084b35eb1a4d3353a501508baf9d3d82822c93 (diff) | |
parent | 2b681fafcc50fea6304ed418667c9d04282acb73 (diff) |
Merge branch 'amd-iommu/2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu into core/iommu
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_api.c | 10 | ||||
-rw-r--r-- | net/sched/sch_atm.c | 2 | ||||
-rw-r--r-- | net/sched/sch_cbq.c | 27 | ||||
-rw-r--r-- | net/sched/sch_drr.c | 2 | ||||
-rw-r--r-- | net/sched/sch_hfsc.c | 2 | ||||
-rw-r--r-- | net/sched/sch_htb.c | 2 |
6 files changed, 24 insertions, 21 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 24d17ce9c294..92e6f3a52c13 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -458,7 +458,7 @@ EXPORT_SYMBOL(qdisc_warn_nonwc); | |||
458 | static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer) | 458 | static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer) |
459 | { | 459 | { |
460 | struct qdisc_watchdog *wd = container_of(timer, struct qdisc_watchdog, | 460 | struct qdisc_watchdog *wd = container_of(timer, struct qdisc_watchdog, |
461 | timer); | 461 | timer.timer); |
462 | 462 | ||
463 | wd->qdisc->flags &= ~TCQ_F_THROTTLED; | 463 | wd->qdisc->flags &= ~TCQ_F_THROTTLED; |
464 | __netif_schedule(qdisc_root(wd->qdisc)); | 464 | __netif_schedule(qdisc_root(wd->qdisc)); |
@@ -468,8 +468,8 @@ static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer) | |||
468 | 468 | ||
469 | void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc) | 469 | void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc) |
470 | { | 470 | { |
471 | hrtimer_init(&wd->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); | 471 | tasklet_hrtimer_init(&wd->timer, qdisc_watchdog, |
472 | wd->timer.function = qdisc_watchdog; | 472 | CLOCK_MONOTONIC, HRTIMER_MODE_ABS); |
473 | wd->qdisc = qdisc; | 473 | wd->qdisc = qdisc; |
474 | } | 474 | } |
475 | EXPORT_SYMBOL(qdisc_watchdog_init); | 475 | EXPORT_SYMBOL(qdisc_watchdog_init); |
@@ -485,13 +485,13 @@ void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, psched_time_t expires) | |||
485 | wd->qdisc->flags |= TCQ_F_THROTTLED; | 485 | wd->qdisc->flags |= TCQ_F_THROTTLED; |
486 | time = ktime_set(0, 0); | 486 | time = ktime_set(0, 0); |
487 | time = ktime_add_ns(time, PSCHED_TICKS2NS(expires)); | 487 | time = ktime_add_ns(time, PSCHED_TICKS2NS(expires)); |
488 | hrtimer_start(&wd->timer, time, HRTIMER_MODE_ABS); | 488 | tasklet_hrtimer_start(&wd->timer, time, HRTIMER_MODE_ABS); |
489 | } | 489 | } |
490 | EXPORT_SYMBOL(qdisc_watchdog_schedule); | 490 | EXPORT_SYMBOL(qdisc_watchdog_schedule); |
491 | 491 | ||
492 | void qdisc_watchdog_cancel(struct qdisc_watchdog *wd) | 492 | void qdisc_watchdog_cancel(struct qdisc_watchdog *wd) |
493 | { | 493 | { |
494 | hrtimer_cancel(&wd->timer); | 494 | tasklet_hrtimer_cancel(&wd->timer); |
495 | wd->qdisc->flags &= ~TCQ_F_THROTTLED; | 495 | wd->qdisc->flags &= ~TCQ_F_THROTTLED; |
496 | } | 496 | } |
497 | EXPORT_SYMBOL(qdisc_watchdog_cancel); | 497 | EXPORT_SYMBOL(qdisc_watchdog_cancel); |
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index 2a8b83af7c47..ab82f145f689 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c | |||
@@ -49,7 +49,7 @@ struct atm_flow_data { | |||
49 | struct socket *sock; /* for closing */ | 49 | struct socket *sock; /* for closing */ |
50 | u32 classid; /* x:y type ID */ | 50 | u32 classid; /* x:y type ID */ |
51 | int ref; /* reference count */ | 51 | int ref; /* reference count */ |
52 | struct gnet_stats_basic bstats; | 52 | struct gnet_stats_basic_packed bstats; |
53 | struct gnet_stats_queue qstats; | 53 | struct gnet_stats_queue qstats; |
54 | struct atm_flow_data *next; | 54 | struct atm_flow_data *next; |
55 | struct atm_flow_data *excess; /* flow for excess traffic; | 55 | struct atm_flow_data *excess; /* flow for excess traffic; |
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index 23a167670fd5..149b0405c5ec 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c | |||
@@ -128,7 +128,7 @@ struct cbq_class | |||
128 | long avgidle; | 128 | long avgidle; |
129 | long deficit; /* Saved deficit for WRR */ | 129 | long deficit; /* Saved deficit for WRR */ |
130 | psched_time_t penalized; | 130 | psched_time_t penalized; |
131 | struct gnet_stats_basic bstats; | 131 | struct gnet_stats_basic_packed bstats; |
132 | struct gnet_stats_queue qstats; | 132 | struct gnet_stats_queue qstats; |
133 | struct gnet_stats_rate_est rate_est; | 133 | struct gnet_stats_rate_est rate_est; |
134 | struct tc_cbq_xstats xstats; | 134 | struct tc_cbq_xstats xstats; |
@@ -163,7 +163,7 @@ struct cbq_sched_data | |||
163 | psched_time_t now_rt; /* Cached real time */ | 163 | psched_time_t now_rt; /* Cached real time */ |
164 | unsigned pmask; | 164 | unsigned pmask; |
165 | 165 | ||
166 | struct hrtimer delay_timer; | 166 | struct tasklet_hrtimer delay_timer; |
167 | struct qdisc_watchdog watchdog; /* Watchdog timer, | 167 | struct qdisc_watchdog watchdog; /* Watchdog timer, |
168 | started when CBQ has | 168 | started when CBQ has |
169 | backlog, but cannot | 169 | backlog, but cannot |
@@ -503,6 +503,8 @@ static void cbq_ovl_delay(struct cbq_class *cl) | |||
503 | cl->undertime = q->now + delay; | 503 | cl->undertime = q->now + delay; |
504 | 504 | ||
505 | if (delay > 0) { | 505 | if (delay > 0) { |
506 | struct hrtimer *ht; | ||
507 | |||
506 | sched += delay + cl->penalty; | 508 | sched += delay + cl->penalty; |
507 | cl->penalized = sched; | 509 | cl->penalized = sched; |
508 | cl->cpriority = TC_CBQ_MAXPRIO; | 510 | cl->cpriority = TC_CBQ_MAXPRIO; |
@@ -510,12 +512,12 @@ static void cbq_ovl_delay(struct cbq_class *cl) | |||
510 | 512 | ||
511 | expires = ktime_set(0, 0); | 513 | expires = ktime_set(0, 0); |
512 | expires = ktime_add_ns(expires, PSCHED_TICKS2NS(sched)); | 514 | expires = ktime_add_ns(expires, PSCHED_TICKS2NS(sched)); |
513 | if (hrtimer_try_to_cancel(&q->delay_timer) && | 515 | ht = &q->delay_timer.timer; |
514 | ktime_to_ns(ktime_sub( | 516 | if (hrtimer_try_to_cancel(ht) && |
515 | hrtimer_get_expires(&q->delay_timer), | 517 | ktime_to_ns(ktime_sub(hrtimer_get_expires(ht), |
516 | expires)) > 0) | 518 | expires)) > 0) |
517 | hrtimer_set_expires(&q->delay_timer, expires); | 519 | hrtimer_set_expires(ht, expires); |
518 | hrtimer_restart(&q->delay_timer); | 520 | hrtimer_restart(ht); |
519 | cl->delayed = 1; | 521 | cl->delayed = 1; |
520 | cl->xstats.overactions++; | 522 | cl->xstats.overactions++; |
521 | return; | 523 | return; |
@@ -591,7 +593,7 @@ static psched_tdiff_t cbq_undelay_prio(struct cbq_sched_data *q, int prio, | |||
591 | static enum hrtimer_restart cbq_undelay(struct hrtimer *timer) | 593 | static enum hrtimer_restart cbq_undelay(struct hrtimer *timer) |
592 | { | 594 | { |
593 | struct cbq_sched_data *q = container_of(timer, struct cbq_sched_data, | 595 | struct cbq_sched_data *q = container_of(timer, struct cbq_sched_data, |
594 | delay_timer); | 596 | delay_timer.timer); |
595 | struct Qdisc *sch = q->watchdog.qdisc; | 597 | struct Qdisc *sch = q->watchdog.qdisc; |
596 | psched_time_t now; | 598 | psched_time_t now; |
597 | psched_tdiff_t delay = 0; | 599 | psched_tdiff_t delay = 0; |
@@ -621,7 +623,7 @@ static enum hrtimer_restart cbq_undelay(struct hrtimer *timer) | |||
621 | 623 | ||
622 | time = ktime_set(0, 0); | 624 | time = ktime_set(0, 0); |
623 | time = ktime_add_ns(time, PSCHED_TICKS2NS(now + delay)); | 625 | time = ktime_add_ns(time, PSCHED_TICKS2NS(now + delay)); |
624 | hrtimer_start(&q->delay_timer, time, HRTIMER_MODE_ABS); | 626 | tasklet_hrtimer_start(&q->delay_timer, time, HRTIMER_MODE_ABS); |
625 | } | 627 | } |
626 | 628 | ||
627 | sch->flags &= ~TCQ_F_THROTTLED; | 629 | sch->flags &= ~TCQ_F_THROTTLED; |
@@ -1214,7 +1216,7 @@ cbq_reset(struct Qdisc* sch) | |||
1214 | q->tx_class = NULL; | 1216 | q->tx_class = NULL; |
1215 | q->tx_borrowed = NULL; | 1217 | q->tx_borrowed = NULL; |
1216 | qdisc_watchdog_cancel(&q->watchdog); | 1218 | qdisc_watchdog_cancel(&q->watchdog); |
1217 | hrtimer_cancel(&q->delay_timer); | 1219 | tasklet_hrtimer_cancel(&q->delay_timer); |
1218 | q->toplevel = TC_CBQ_MAXLEVEL; | 1220 | q->toplevel = TC_CBQ_MAXLEVEL; |
1219 | q->now = psched_get_time(); | 1221 | q->now = psched_get_time(); |
1220 | q->now_rt = q->now; | 1222 | q->now_rt = q->now; |
@@ -1397,7 +1399,8 @@ static int cbq_init(struct Qdisc *sch, struct nlattr *opt) | |||
1397 | q->link.minidle = -0x7FFFFFFF; | 1399 | q->link.minidle = -0x7FFFFFFF; |
1398 | 1400 | ||
1399 | qdisc_watchdog_init(&q->watchdog, sch); | 1401 | qdisc_watchdog_init(&q->watchdog, sch); |
1400 | hrtimer_init(&q->delay_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); | 1402 | tasklet_hrtimer_init(&q->delay_timer, cbq_undelay, |
1403 | CLOCK_MONOTONIC, HRTIMER_MODE_ABS); | ||
1401 | q->delay_timer.function = cbq_undelay; | 1404 | q->delay_timer.function = cbq_undelay; |
1402 | q->toplevel = TC_CBQ_MAXLEVEL; | 1405 | q->toplevel = TC_CBQ_MAXLEVEL; |
1403 | q->now = psched_get_time(); | 1406 | q->now = psched_get_time(); |
diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c index 7597fe146866..12b2fb04b29b 100644 --- a/net/sched/sch_drr.c +++ b/net/sched/sch_drr.c | |||
@@ -22,7 +22,7 @@ struct drr_class { | |||
22 | unsigned int refcnt; | 22 | unsigned int refcnt; |
23 | unsigned int filter_cnt; | 23 | unsigned int filter_cnt; |
24 | 24 | ||
25 | struct gnet_stats_basic bstats; | 25 | struct gnet_stats_basic_packed bstats; |
26 | struct gnet_stats_queue qstats; | 26 | struct gnet_stats_queue qstats; |
27 | struct gnet_stats_rate_est rate_est; | 27 | struct gnet_stats_rate_est rate_est; |
28 | struct list_head alist; | 28 | struct list_head alist; |
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index 362c2811b2df..dad0144423da 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c | |||
@@ -116,7 +116,7 @@ struct hfsc_class | |||
116 | struct Qdisc_class_common cl_common; | 116 | struct Qdisc_class_common cl_common; |
117 | unsigned int refcnt; /* usage count */ | 117 | unsigned int refcnt; /* usage count */ |
118 | 118 | ||
119 | struct gnet_stats_basic bstats; | 119 | struct gnet_stats_basic_packed bstats; |
120 | struct gnet_stats_queue qstats; | 120 | struct gnet_stats_queue qstats; |
121 | struct gnet_stats_rate_est rate_est; | 121 | struct gnet_stats_rate_est rate_est; |
122 | unsigned int level; /* class level in hierarchy */ | 122 | unsigned int level; /* class level in hierarchy */ |
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 88cd02626621..ec4d46399d59 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
@@ -74,7 +74,7 @@ enum htb_cmode { | |||
74 | struct htb_class { | 74 | struct htb_class { |
75 | struct Qdisc_class_common common; | 75 | struct Qdisc_class_common common; |
76 | /* general class parameters */ | 76 | /* general class parameters */ |
77 | struct gnet_stats_basic bstats; | 77 | struct gnet_stats_basic_packed bstats; |
78 | struct gnet_stats_queue qstats; | 78 | struct gnet_stats_queue qstats; |
79 | struct gnet_stats_rate_est rate_est; | 79 | struct gnet_stats_rate_est rate_est; |
80 | struct tc_htb_xstats xstats; /* our special stats */ | 80 | struct tc_htb_xstats xstats; /* our special stats */ |