From: "Ortwin Glück" <odi@odi.ch>
To: linux-kernel@vger.kernel.org
Subject: contention on long-held spinlock
Date: Fri, 19 Aug 2011 11:21:46 +0200 [thread overview]
Message-ID: <4E4E2B2A.40100@odi.ch> (raw)
Hi,
I have observed a bad behaviour that is likely caused by spinlocks in
the qla2xxx driver. This is a QLogic Fibre Channel storage driver.
Somehow the attached SAN had a problem and became unresponsive. Many
processes queued up waiting to write to the device. The processes were
doing nothing but wait, but system load increased to insane values (40
and above on a 4 core machine). The system was very sluggish and
unresponsive, making it very hard and slow to see what actually was the
problem.
I didn't run an indepth analysis, but this is my guess: I see that
qla2xxx uses spinlocks to guard the HW against concurrent access. So if
the HW becomes unresponsive all waiters would busy spin and burn
resources, right? Those spinlocks are superfast as long as the HW
responds well, but become a CPU burner once the HW becomes slow.
I wonder if spinlocks could be made aware of such a situation and relax.
Something like if spinning for more than 1000 times, perform a simple
backoff and sleep. A spinlock should never spin busy for several
seconds, right?
Thanks,
Ortwin
next reply other threads:[~2011-08-19 9:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-19 9:21 Ortwin Glück [this message]
2011-08-19 19:25 ` contention on long-held spinlock Bryan Donlan
[not found] ` <5E4F49720D0BAD499EE1F01232234BA873C669E4D7@AVEXMB1.qlogic.org>
2011-08-23 15:07 ` Bryan Donlan
2011-08-23 16:24 ` Arnd Bergmann
2011-08-19 23:30 ` Andi Kleen
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=4E4E2B2A.40100@odi.ch \
--to=odi@odi.ch \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox