diff options
author | David S. Miller <davem@davemloft.net> | 2008-03-24 01:54:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-24 01:54:03 -0400 |
commit | 06802a819a0a2d31c952c0624cea6cd00e4e50da (patch) | |
tree | 8ccd7c668c7fbd8f08cb89426006040217caf3f1 /net/sched | |
parent | 9bd512f619cc116b7830134d7c9f6e404a38c7bf (diff) | |
parent | 8f3ea33a5078a09eba12bfe57424507809367756 (diff) |
Merge branch 'master' of ../net-2.6/
Conflicts:
net/ipv6/ndisc.c
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_htb.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 795c761ad99f..66148cc4759e 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
@@ -711,9 +711,11 @@ static void htb_charge_class(struct htb_sched *q, struct htb_class *cl, | |||
711 | */ | 711 | */ |
712 | static psched_time_t htb_do_events(struct htb_sched *q, int level) | 712 | static psched_time_t htb_do_events(struct htb_sched *q, int level) |
713 | { | 713 | { |
714 | int i; | 714 | /* don't run for longer than 2 jiffies; 2 is used instead of |
715 | 715 | 1 to simplify things when jiffy is going to be incremented | |
716 | for (i = 0; i < 500; i++) { | 716 | too soon */ |
717 | unsigned long stop_at = jiffies + 2; | ||
718 | while (time_before(jiffies, stop_at)) { | ||
717 | struct htb_class *cl; | 719 | struct htb_class *cl; |
718 | long diff; | 720 | long diff; |
719 | struct rb_node *p = rb_first(&q->wait_pq[level]); | 721 | struct rb_node *p = rb_first(&q->wait_pq[level]); |
@@ -731,9 +733,8 @@ static psched_time_t htb_do_events(struct htb_sched *q, int level) | |||
731 | if (cl->cmode != HTB_CAN_SEND) | 733 | if (cl->cmode != HTB_CAN_SEND) |
732 | htb_add_to_wait_tree(q, cl, diff); | 734 | htb_add_to_wait_tree(q, cl, diff); |
733 | } | 735 | } |
734 | if (net_ratelimit()) | 736 | /* too much load - let's continue on next jiffie */ |
735 | printk(KERN_WARNING "htb: too many events !\n"); | 737 | return q->now + PSCHED_TICKS_PER_SEC / HZ; |
736 | return q->now + PSCHED_TICKS_PER_SEC / 10; | ||
737 | } | 738 | } |
738 | 739 | ||
739 | /* Returns class->node+prio from id-tree where classe's id is >= id. NULL | 740 | /* Returns class->node+prio from id-tree where classe's id is >= id. NULL |