LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@intel.com>
To: "Thomas Graf" <tgraf@suug.ch>
Cc: "Kok, Auke-jan H" <auke-jan.h.kok@intel.com>,
"David Miller" <davem@davemloft.net>,
"Garzik, Jeff" <jgarzik@pobox.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
"Brandeburg, Jesse" <jesse.brandeburg@intel.com>,
"Kok, Auke" <auke@foo-projects.org>,
"Ronciak, John" <john.ronciak@intel.com>
Subject: RE: [PATCH 1/2] NET: Multiple queue network device support
Date: Sat, 10 Mar 2007 12:37:24 -0800 [thread overview]
Message-ID: <D5C1322C3E673F459512FB59E0DDC329026EA188@orsmsx414.amr.corp.intel.com> (raw)
In-Reply-To: <20070310023432.GJ521@postel.suug.ch>
> -----Original Message-----
> From: Thomas Graf [mailto:tgraf@suug.ch]
> Sent: Friday, March 09, 2007 6:35 PM
> To: Waskiewicz Jr, Peter P
> Cc: Kok, Auke-jan H; David Miller; Garzik, Jeff;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> Brandeburg, Jesse; Kok, Auke; Ronciak, John
> Subject: Re: [PATCH 1/2] NET: Multiple queue network device support
>
> * Waskiewicz Jr, Peter P <peter.p.waskiewicz.jr@intel.com>
> 2007-03-09 15:27
> > That's the entire point of this extra locking. enqueue()
> is going to
> > put an skb into a band somewhere that maps to some queue,
> and there is
> > no way to guarantee the skb I retrieve from dequeue() is headed for
> > the same queue. Therefore, I need to unlock the queue
> after I finish
> > enqueuing, since having that lock makes little sense to dequeue().
> > dequeue() will then grab *a* lock on a queue; it may be the
> same one
> > we had during enqueue(), but it may not be. And the
> placement of the
> > unlock of that queue is exactly where it happens in non-multiqueue,
> > which is right before the hard_start_xmit().
>
> The lock is already unlocked after dequeue, from your prio_dequeue():
>
> if (netif_is_multiqueue(sch->dev)) {
> queue = q->band2queue[prio];
> if
> (spin_trylock(&sch->dev->egress_subqueue[queue].queue_lock)) {
> qdisc = q->queues[prio];
> skb = qdisc->dequeue(qdisc);
> if (skb) {
> sch->q.qlen--;
> skb->priority = prio;
>
> spin_unlock(&sch->dev->egress_subqueue[queue].queue_lock);
> return skb;
> }
>
> spin_unlock(&sch->dev->egress_subqueue[queue].queue_lock);
> }
Ok, now I see what's wrong. Taking Dave M.'s recommendation to store
the queue mapping in the skb will let me unlock the queue when dequeue()
returns. I'll fix this locking issue; thanks for the feedback and
persistent drilling into my thick head.
-PJ Waskiewicz
peter.p.waskiewicz.jr@intel.com
next prev parent reply other threads:[~2007-03-10 20:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-09 0:09 [PATCH 0/2 REVIEW] Multiple transmit/receive queue kernel Kok, Auke
2007-02-09 0:09 ` [PATCH 1/2] NET: Multiple queue network device support Kok, Auke
2007-02-27 1:03 ` David Miller
2007-02-27 19:38 ` Waskiewicz Jr, Peter P
2007-03-07 22:18 ` Waskiewicz Jr, Peter P
2007-03-07 22:42 ` David Miller
2007-03-09 7:26 ` Jarek Poplawski
2007-03-09 13:40 ` Thomas Graf
2007-03-09 19:25 ` Waskiewicz Jr, Peter P
2007-03-09 23:01 ` Thomas Graf
2007-03-09 23:27 ` Waskiewicz Jr, Peter P
2007-03-10 2:34 ` Thomas Graf
2007-03-10 20:37 ` Waskiewicz Jr, Peter P [this message]
2007-03-12 8:58 ` Jarek Poplawski
2007-03-12 20:21 ` Waskiewicz Jr, Peter P
2007-02-09 0:09 ` [PATCH 2/2] e1000: Implement the new kernel API for multiqueue TX support Kok, Auke
2007-03-09 13:11 ` Thomas Graf
2007-02-23 9:00 [PATCH 1/2] NET: Multiple queue network device support Sreenivasa Honnur
2007-02-23 19:05 ` Waskiewicz Jr, Peter P
2007-02-23 19:19 ` Stephen Hemminger
2007-02-23 19:23 ` Kok, Auke
2007-02-23 9:02 Sreenivasa Honnur
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=D5C1322C3E673F459512FB59E0DDC329026EA188@orsmsx414.amr.corp.intel.com \
--to=peter.p.waskiewicz.jr@intel.com \
--cc=auke-jan.h.kok@intel.com \
--cc=auke@foo-projects.org \
--cc=davem@davemloft.net \
--cc=jesse.brandeburg@intel.com \
--cc=jgarzik@pobox.com \
--cc=john.ronciak@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tgraf@suug.ch \
--subject='RE: [PATCH 1/2] NET: Multiple queue network device support' \
/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
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).