Re: [PATCH 4/5] netem: avoid excessive requeues

2007-03-23 Thread Patrick McHardy
Patrick McHardy wrote: > David Miller wrote: > >>>Perhaps we should put this in qdisc_restart, other qdiscs have the >>>same problem. >> >> >>Agreed, patches welcome :) > > > I've tried this, but for some reason it makes TBF stay about > 5% under the configured rate. Probably because of late tim

Re: [PATCH 4/5] netem: avoid excessive requeues

2007-03-23 Thread Patrick McHardy
David Miller wrote: > From: Patrick McHardy <[EMAIL PROTECTED]> > Date: Thu, 22 Mar 2007 21:40:43 +0100 > >>Perhaps we should put this in qdisc_restart, other qdiscs have the >>same problem. > > > Agreed, patches welcome :) I've tried this, but for some reason it makes TBF stay about 5% under

Re: [PATCH 4/5] netem: avoid excessive requeues

2007-03-22 Thread David Miller
From: Patrick McHardy <[EMAIL PROTECTED]> Date: Thu, 22 Mar 2007 21:40:43 +0100 > > --- net-2.6.22.orig/net/sched/sch_netem.c > > +++ net-2.6.22/net/sched/sch_netem.c > > @@ -272,6 +272,10 @@ static struct sk_buff *netem_dequeue(str > > struct netem_sched_data *q = qdisc_priv(sch); > > str

Re: [PATCH 4/5] netem: avoid excessive requeues

2007-03-22 Thread Patrick McHardy
Stephen Hemminger wrote: > @@ -315,6 +316,7 @@ void qdisc_watchdog_schedule(struct qdis > ktime_t time; > > wd->qdisc->flags |= TCQ_F_THROTTLED; > + smp_wmb(); > time = ktime_set(0, 0); > time = ktime_add_ns(time, PSCHED_US2NS(expires)); > hrtimer_start(&wd->time

[PATCH 4/5] netem: avoid excessive requeues

2007-03-21 Thread Stephen Hemminger
The netem code would call getnstimeofday() and dequeue/requeue after every packet, even if it was waiting. Avoid this overhead by using the throttled flag. Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> --- net/sched/sch_api.c |3 +++ net/sched/sch_netem.c | 21