aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorJarek Poplawski <jarkao2@gmail.com>2009-02-01 04:13:05 -0500
committerDavid S. Miller <davem@davemloft.net>2009-02-01 04:13:05 -0500
commite82181de5ef4648074765912d2d82d6bd60115eb (patch)
treef977e4d099c2df0ba78da1fa6d47d13ba70cfb09 /net/sched
parentb00355db3f88d96810a60011a30cfb2c3469409d (diff)
pkt_sched: sch_htb: Warn on too many events.
Let's get some info on possible config problems. This patch brings back an old warning, but is printed only once now. With feedback from Patrick McHardy <kaber@trash.net> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_htb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 77ff510ef8ac..826f92145261 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -153,6 +153,9 @@ struct htb_sched {
153 int direct_qlen; /* max qlen of above */ 153 int direct_qlen; /* max qlen of above */
154 154
155 long direct_pkts; 155 long direct_pkts;
156
157#define HTB_WARN_TOOMANYEVENTS 0x1
158 unsigned int warned; /* only one warning */
156}; 159};
157 160
158/* find class in global hash table using given handle */ 161/* find class in global hash table using given handle */
@@ -685,6 +688,10 @@ static psched_time_t htb_do_events(struct htb_sched *q, int level,
685 htb_add_to_wait_tree(q, cl, diff); 688 htb_add_to_wait_tree(q, cl, diff);
686 } 689 }
687 /* too much load - let's continue on next jiffie (including above) */ 690 /* too much load - let's continue on next jiffie (including above) */
691 if (!(q->warned & HTB_WARN_TOOMANYEVENTS)) {
692 printk(KERN_WARNING "htb: too many events!\n");
693 q->warned |= HTB_WARN_TOOMANYEVENTS;
694 }
688 return q->now + 2 * PSCHED_TICKS_PER_SEC / HZ; 695 return q->now + 2 * PSCHED_TICKS_PER_SEC / HZ;
689} 696}
690 697