netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: unlock busylock before servicing qdisc
@ 2012-06-28 19:22 Eric Dumazet
  2012-06-28 23:48 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2012-06-28 19:22 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Tom Parkin

From: Eric Dumazet <edumazet@google.com>

commit 79640a4ca6 (net: add additional lock to qdisc to increase
throughput) added a LOCKDEP occurrence on bonding/l2tp or other stacked
devices, if several levels use a qdisc.

We should release the busylock before the call to sch_direct_xmit() or
else LOCKDEP complains we try to lock busylock again in the lower dev
qdisc handler.

This of course is a false lockdep positive, but this
patch is the simplest way to get rid of it.

Reported-by: Tom Parkin <tparkin@katalix.com>
Tested-by: Tom Parkin <tparkin@katalix.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Alexander Duyck <alexander.h.duyck@intel.com>
---
 net/core/dev.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 6df2140..d265c67 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2412,13 +2412,13 @@ static inline int __dev_xmit_skb(struct sk_buff
*skb, struct Qdisc *q,
 
 		qdisc_bstats_update(q, skb);
 
-		if (sch_direct_xmit(skb, q, dev, txq, root_lock)) {
-			if (unlikely(contended)) {
-				spin_unlock(&q->busylock);
-				contended = false;
-			}
+		if (unlikely(contended)) {
+			spin_unlock(&q->busylock);
+			contended = false;
+		}
+		if (sch_direct_xmit(skb, q, dev, txq, root_lock))
 			__qdisc_run(q);
-		} else
+		else
 			qdisc_run_end(q);
 
 		rc = NET_XMIT_SUCCESS;

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

* Re: [PATCH] net: unlock busylock before servicing qdisc
  2012-06-28 19:22 [PATCH] net: unlock busylock before servicing qdisc Eric Dumazet
@ 2012-06-28 23:48 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-06-28 23:48 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, tparkin

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 28 Jun 2012 21:22:42 +0200

> @@ -2412,13 +2412,13 @@ static inline int __dev_xmit_skb(struct sk_buff
> *skb, struct Qdisc *q,

Looks like your email client clobbered this, please resubmit.

Thanks.

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

end of thread, other threads:[~2012-06-28 23:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-28 19:22 [PATCH] net: unlock busylock before servicing qdisc Eric Dumazet
2012-06-28 23:48 ` 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).