Skip to contentSkip to conversation

pkt_sched: sch_htb: Consider used jiffies in htb_do_events()

PATCH Applied Jarek Poplawski 1 participant 1 message Dec 9, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/6 pkt_sched: sch_htb: Consider used jiffies in htb_do_events()

Next event time should consider jiffies used for recounting. Otherwise qdisc_watchdog_schedule() triggers hrtimer immediately with the event in the past, and may cause very high ksoftirqd cpu usage (if highres is on).

---
 net/sched/sch_htb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
net/sched/sch_htb.c +2 -2
index f89fd71..d6eb4a7 100644
@@ -685,8 +685,8 @@ static psched_time_t htb_do_events(struct htb_sched *q, int level)
 		if (cl->cmode != HTB_CAN_SEND)
 			htb_add_to_wait_tree(q, cl, diff);
 	}
-	/* too much load - let's continue on next jiffie */
-	return q->now + PSCHED_TICKS_PER_SEC / HZ;
+	/* too much load - let's continue on next jiffie (including above) */
+	return q->now + 2 * PSCHED_TICKS_PER_SEC / HZ;
 }
 
 /* Returns class->node+prio from id-tree where classe's id is >= id. NULL
Signature · 1 line
1.5.6.5