netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC] pkt_sched: Remove smp_wmb() in qdisc_watchdog()
@ 2008-12-19 11:30 Jarek Poplawski
  2008-12-19 11:41 ` Jarek Poplawski
  2008-12-23  3:44 ` [PATCH RFC] " David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Jarek Poplawski @ 2008-12-19 11:30 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

Hi,

I hope Stephen will find a minute to reconsider and/or comment this
a bit.

Thanks,
Jarek P.
---------->

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>
---

 net/sched/sch_api.c   |    1 -
 net/sched/sch_netem.c |    1 -
 2 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 6bc29e8..0fc4a18 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -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;
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 7e78f1c..d876b87 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -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;
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-12-23  3:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-19 11:30 [PATCH RFC] pkt_sched: Remove smp_wmb() in qdisc_watchdog() Jarek Poplawski
2008-12-19 11:41 ` Jarek Poplawski
2008-12-20  2:18   ` Stephen Hemminger
2008-12-22  7:57     ` [PATCH v2] " Jarek Poplawski
2008-12-23  3:44 ` [PATCH RFC] " David Miller

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).