linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-mm@kvack.org, apw@shadowen.org
Subject: Re: [patch 0/5] [RFC] Conversion of reverse map locks to semaphores
Date: Fri, 27 Jun 2008 08:46:47 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0806270844040.12950@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <1214556789.2801.19.camel@twins.programming.kicks-ass.net>

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.

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.

> 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.


--
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>

  reply	other threads:[~2008-06-27 15:46 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 [this message]
2008-06-27 16:38     ` Peter Zijlstra

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=Pine.LNX.4.64.0806270844040.12950@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=apw@shadowen.org \
    --cc=linux-mm@kvack.org \
    --cc=peterz@infradead.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