From: Andi Kleen <andi@firstfloor.org>
To: "Ortwin Glück" <odi@odi.ch>
Cc: linux-kernel@vger.kernel.org
Subject: Re: contention on long-held spinlock
Date: Fri, 19 Aug 2011 16:30:22 -0700 [thread overview]
Message-ID: <m27h69htdd.fsf@firstfloor.org> (raw)
In-Reply-To: <4E4E2B2A.40100@odi.ch> ("Ortwin Glück"'s message of "Fri, 19 Aug 2011 11:21:46 +0200")
Ortwin Glück <odi@odi.ch> writes:
>
> 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?
Spining for several seconds is always a bug. There's no way to make
this work. Please post backtraces (e.g. from perf record -g ; perf
report) and cc the driver maintainer, so that they can fix their
buggy code.
-Andi
--
ak@linux.intel.com -- Speaking for myself only
prev parent reply other threads:[~2011-08-19 23:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-19 9:21 contention on long-held spinlock Ortwin Glück
2011-08-19 19:25 ` 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 [this message]
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=m27h69htdd.fsf@firstfloor.org \
--to=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=odi@odi.ch \
/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