From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
To: "'David S. Miller'" <davem@redhat.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: RE: net_device->queue_lock contention on 32-way box
Date: Wed, 26 May 2004 14:47:15 -0700 [thread overview]
Message-ID: <200405262147.i4QLlFF23657@unix-os.sc.intel.com> (raw)
In-Reply-To: <20040526135436.657df321.davem@redhat.com>
>>>> David S. Miller wrote on Wednesday, May 26, 2004 1:55 PM
> The net_tx_action() --> qdisc_run() --> qdisc_restart() code path
> can hold the lock for a long time especially if lots of packets
> have been enqueued before net_tx_action() had a chance to run.
>
> For each enqueued packet, we go all the way into the device driver
> to give the packet to the device. Given that PCI PIO accesses are
> likely in these paths, along with some memory accesses (to setup
> packet descriptors and the like) this could take quite a bit of
> time.
>
> We do temporarily release the dev->queue_lock in between each
> packet while we go into the driver. It could be what you're
> seeing is the latency to get the device's dev->xmit_lock because
> we have to acquire that before we can release the dev->queue_lock
>
That's where I'm having trouble in interpreting the lockmeter
data. qdisc_restart() does a trylock on dev->xmit_lock, if it gets
it, unlock queue_lock right away. If it didn't get it, queue the
packet and return, then qdisc_run terminates and the caller to
qdisc_run will unlock queue_lock. Don't see that as a long operation
at all. Could netif_schedule() take long time to run?
> If you bind the device interrupts to one cpu, do things change?
We always bind network interrupt to one cpu, haven't tried with
non-bound configuration.
next prev parent reply other threads:[~2004-05-26 21:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-26 20:47 net_device->queue_lock contention on 32-way box Chen, Kenneth W
2004-05-26 20:54 ` David S. Miller
2004-05-26 21:47 ` Chen, Kenneth W [this message]
2004-05-26 22:00 ` David S. Miller
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=200405262147.i4QLlFF23657@unix-os.sc.intel.com \
--to=kenneth.w.chen@intel.com \
--cc=davem@redhat.com \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.