From: Peter Zijlstra <peterz@infradead.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: linux-mm@kvack.org, apw@shadowen.org, Ingo Molnar <mingo@elte.hu>,
David Howells <dhowells@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Nick Piggin <nickpiggin@yahoo.com.au>
Subject: Re: [patch 0/5] [RFC] Conversion of reverse map locks to semaphores
Date: Fri, 27 Jun 2008 18:38:07 +0200 [thread overview]
Message-ID: <1214584687.12348.8.camel@twins> (raw)
In-Reply-To: <Pine.LNX.4.64.0806270844040.12950@schroedinger.engr.sgi.com>
On Fri, 2008-06-27 at 08:46 -0700, Christoph Lameter wrote:
> On Fri, 27 Jun 2008, Peter Zijlstra wrote:
>
> > > Also it seems that a semaphore helps RT and should avoid busy spinning
> > > on systems where these locks experience significant contention.
> >
> > Please be careful with the wording here. Semaphores are evil esp for RT.
> > But luckily you're referring to a sleeping RW lock, which we call
> > RW-semaphore (but is not an actual semaphore).
> >
> > You really scared some people saying this ;-)
>
> Well we use the term semaphore for sleeping locks in the kernel it seems.
We have an actual mutex implementation, which is oddly enough called a
mutex, not binary-semaphore-with-owner-semantics.
> Maybe you could get a patch done that renames the struct to
> sleeping_rw_lock or so? That would finally clear the air. This is the
> second or third time we talk about a semaphore not truly being a
> semaphore.
Yes indeed. It mainly comes from the fact that some people drop the rw
prefix, creating the implession they talk about an actual semaphore
(which we also still have).
About that rename - it's come up before, and while I would not mind to
do such a rename, we've failed to come up with a decent name. I think
people will object to the length of your proposed one.
We could of course go for the oxymoron: rw_mutex, but I think that was
shot down once before.
> > Depending on the contention stats you could try an adaptive spin on the
> > readers. I doubt adaptive spins on the writer would work out well, with
> > the natural plenty-ness of readers..
>
> That depends on the frequency of lock taking and the contention. If you
> have a rw lock then you would assume that writers are rare so this is
> likely okay.
Agreed.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2008-06-27 16:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-26 0:36 Christoph Lameter
2008-06-26 0:36 ` [patch 1/5] Move tlb handling into free_pgtables() Christoph Lameter
2008-06-26 0:36 ` [patch 2/5] Move tlb flushing inside of unmap vmas Christoph Lameter
2008-06-26 0:36 ` [patch 3/5] Add capability to check if rwsems are contended Christoph Lameter
2008-06-26 0:36 ` [patch 4/5] Convert i_mmap_lock to a rw semaphore Christoph Lameter
2008-06-26 0:36 ` [patch 5/5] Convert anon_vma spinlock to " Christoph Lameter
2008-06-26 1:05 ` Andrea Arcangeli
2008-06-26 17:23 ` Christoph Lameter
2008-06-26 17:27 ` Andrea Arcangeli
2008-06-26 0:53 ` [patch 0/5] [RFC] Conversion of reverse map locks to semaphores Andrea Arcangeli
2008-06-26 17:19 ` Christoph Lameter
2008-06-27 8:53 ` Peter Zijlstra
2008-06-27 15:46 ` Christoph Lameter
2008-06-27 16:38 ` Peter Zijlstra [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=1214584687.12348.8.camel@twins \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=apw@shadowen.org \
--cc=clameter@sgi.com \
--cc=dhowells@redhat.com \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
--cc=torvalds@linux-foundation.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