From: Nick Piggin <npiggin@suse.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: mingo@elte.hu, linux-kernel@vger.kernel.org, kiran@scalex86.org
Subject: Re: [rfc][patch] queued spinlocks (i386)
Date: Wed, 28 Mar 2007 08:56:50 +0200 [thread overview]
Message-ID: <20070328065650.GB12508@wotan.suse.de> (raw)
In-Reply-To: <20070324134128.7882f905.akpm@linux-foundation.org>
On Sat, Mar 24, 2007 at 01:41:28PM -0800, Andrew Morton wrote:
> > On Fri, 23 Mar 2007 11:32:44 +0100 Nick Piggin <npiggin@suse.de> wrote:
> >
> > I'm not as concerned about the contended performance of spinlocks
> >
>
> The contended case matters. Back in 2.5.something I screwed up the debug
> version of one of the locks (rwlock, iirc) - it was simply missing a
> cpu_relax(), and some people's benchmarks halved.
Do you have a reference?
rwlocks are a bit funny, because if they are found to be useful (that
is, they get used somewhere), then it indicates there can be situations
with a lot of contention and spinning.
Wheras we usually prefer not to use spinlocks in situations like that.
Not that I'm claiming the contended case doesn't matter, but I think
problems there indicate a bug (and I think rwlocks are almost always
questionable).
Anyway, I'll look at doing some contended case optimisations afterward.
> > This was just something I had in mind when the hardware lock
> > starvation issue came up
>
> It looks like a good way to address the lru_lock starvation/capture
> problem. But I think I'd be more comfortable if we were to introduce it as
> a new lock type, rather than as a reimplementation of the existing
> spin_lock(). Initially, at least.
I'd hate to have a proliferation of lock types though. I think my
queued spinlock addresses a real hardware limitation of some systems.
In situations where contention isn't a problem, then queued locks won't
cause a slowdown. In situations where it is, starvation could also be
a problem.
prev parent reply other threads:[~2007-03-28 6:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-23 8:59 Nick Piggin
2007-03-23 9:40 ` Eric Dumazet
2007-03-23 9:59 ` Nick Piggin
2007-03-23 19:27 ` Ravikiran G Thirumalai
2007-03-23 10:04 ` Ingo Molnar
2007-03-23 10:10 ` Nick Piggin
2007-03-23 16:48 ` Parag Warudkar
2007-03-23 18:15 ` Davide Libenzi
2007-03-23 10:32 ` Nick Piggin
2007-03-23 10:40 ` Eric Dumazet
2007-03-23 11:02 ` William Lee Irwin III
2007-03-24 15:55 ` Nikita Danilov
2007-03-24 17:29 ` Ingo Molnar
2007-03-24 18:49 ` Nikita Danilov
2007-03-28 6:43 ` Nick Piggin
2007-03-28 19:26 ` Davide Libenzi
2007-03-28 22:00 ` Davide Libenzi
2007-03-29 1:36 ` Nick Piggin
2007-03-29 7:16 ` Nick Piggin
2007-03-30 0:27 ` Davide Libenzi
2007-03-30 1:59 ` Nick Piggin
2007-03-30 2:43 ` Davide Libenzi
2007-03-29 1:24 ` Nick Piggin
2007-03-24 21:41 ` Andrew Morton
2007-03-28 6:56 ` Nick Piggin [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=20070328065650.GB12508@wotan.suse.de \
--to=npiggin@suse.de \
--cc=akpm@linux-foundation.org \
--cc=kiran@scalex86.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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
all inboxes | Powered by JetHome®