From: Patrick McHardy <kaber@trash.net>
To: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH 4/5] netem: avoid excessive requeues
Date: Thu, 22 Mar 2007 21:40:43 +0100 [thread overview]
Message-ID: <4602E9CB.8030500@trash.net> (raw)
In-Reply-To: <20070321174422.767901837@linux-foundation.org>
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->timer, time, HRTIMER_MODE_ABS);
> @@ -325,6 +327,7 @@ void qdisc_watchdog_cancel(struct qdisc_
> {
> hrtimer_cancel(&wd->timer);
> wd->qdisc->flags &= ~TCQ_F_THROTTLED;
> + smp_wmb();
> }
> EXPORT_SYMBOL(qdisc_watchdog_cancel);
These two look unnecessary, we're holding the queue lock.
> --- 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);
> struct sk_buff *skb;
>
> + smp_mb();
> + if (sch->flags & TCQ_F_THROTTLED)
> + return NULL;
> +
Perhaps we should put this in qdisc_restart, other qdiscs have the
same problem.
next prev parent reply other threads:[~2007-03-22 20:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-21 17:42 [PATCH 0/5] netem performance improvements Stephen Hemminger
2007-03-21 17:42 ` [PATCH 1/5] netem: report reorder percent correctly Stephen Hemminger
2007-03-21 17:42 ` [PATCH 2/5] netem: use better types for time values Stephen Hemminger
2007-03-21 17:42 ` [PATCH 3/5] netem: optimize tfifo Stephen Hemminger
2007-03-21 17:42 ` [PATCH 4/5] netem: avoid excessive requeues Stephen Hemminger
2007-03-22 20:40 ` Patrick McHardy [this message]
2007-03-22 21:08 ` David Miller
2007-03-23 11:06 ` Patrick McHardy
2007-03-23 13:26 ` Patrick McHardy
2007-03-21 17:42 ` [PATCH 5/5] qdisc: avoid transmit softirq on watchdog wakeup Stephen Hemminger
2007-03-22 19:19 ` [PATCH 0/5] netem performance improvements David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4602E9CB.8030500@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).