pkt_sched: Remove smp_wmb() in qdisc_watchdog()
authorJarek Poplawski <jarkao2@gmail.com>
Tue, 23 Dec 2008 03:44:13 +0000 (19:44 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Dec 2008 03:44:13 +0000 (19:44 -0800)
While implementing a TCQ_F_THROTTLED flag there was used an smp_wmb()
in qdisc_watchdog(), but since this flag is practically used only in
sch_netem(), and since it's not even clear what reordering is avoided
here (TCQ_F_THROTTLED vs. __QDISC_STATE_SCHED?) it seems the barrier
could be safely removed.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_api.c
net/sched/sch_netem.c

index 6bc29e8a7f32eb9190fca2e2a000099b3e1b596a..0fc4a18fd96f7d83ec21e95bc6d0740025f6a219 100644 (file)
@@ -450,7 +450,6 @@ static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer)
                                                 timer);
 
        wd->qdisc->flags &= ~TCQ_F_THROTTLED;
-       smp_wmb();
        __netif_schedule(qdisc_root(wd->qdisc));
 
        return HRTIMER_NORESTART;
index 7e78f1c0f35780d91825219b59751718189313c7..d876b873484852d0a1da004e51fc4198d65627de 100644 (file)
@@ -266,7 +266,6 @@ static struct sk_buff *netem_dequeue(struct Qdisc *sch)
        struct netem_sched_data *q = qdisc_priv(sch);
        struct sk_buff *skb;
 
-       smp_mb();
        if (sch->flags & TCQ_F_THROTTLED)
                return NULL;