netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 1/13]: netdev: Allocate multiple queues for TX.
Date: Wed, 16 Jul 2008 07:01:08 +0000	[thread overview]
Message-ID: <20080716070108.GA4099@ff.dom.local> (raw)
In-Reply-To: <20080710.035610.167480342.davem@davemloft.net>

On 10-07-2008 12:56, David Miller wrote:
...
> diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
> index 243de93..4e2b865 100644
> --- a/net/sched/sch_generic.c
> +++ b/net/sched/sch_generic.c
> @@ -40,20 +40,30 @@
>   */
>  
>  void qdisc_lock_tree(struct net_device *dev)
> -	__acquires(dev->tx_queue.lock)
>  	__acquires(dev->rx_queue.lock)
>  {
> -	spin_lock_bh(&dev->tx_queue.lock);
> +	unsigned int i;
> +
> +	local_bh_disable();
> +	for (i = 0; i < dev->num_tx_queues; i++) {
> +		struct netdev_queue *txq = netdev_get_tx_queue(dev, i);
> +		spin_lock(&txq->lock);

I wonder if it was tested with lockdep? It seems additional
annotation is needed for such nesting (not counting rx_queue.lock
annotation).

Jarek P.

> +	}
>  	spin_lock(&dev->rx_queue.lock);
>  }
>  EXPORT_SYMBOL(qdisc_lock_tree);

  parent reply	other threads:[~2008-07-16  6:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-10 10:56 [PATCH 1/13]: netdev: Allocate multiple queues for TX David Miller
2008-07-11 21:19 ` Eric Dumazet
2008-07-15  9:45   ` David Miller
2008-07-16  7:01 ` Jarek Poplawski [this message]
2008-07-16  7:37   ` David Miller
2008-07-16  8:00     ` Jarek Poplawski

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=20080716070108.GA4099@ff.dom.local \
    --to=jarkao2@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.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).