All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: David Howells <dhowells@redhat.com>
Cc: "Török Edwin" <edwin@clamav.net>, "Ingo Molnar" <mingo@elte.hu>,
	"Linux Kernel" <linux-kernel@vger.kernel.org>,
	aCaB <acab@clamav.net>, "Nick Piggin" <npiggin@suse.de>,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	"Thomas Gleixner" <tglx@linutronix.de>
Subject: Re: Mutex vs semaphores scheduler bug
Date: Sat, 17 Oct 2009 17:32:07 +0200	[thread overview]
Message-ID: <1255793527.8152.4.camel@laptop> (raw)
In-Reply-To: <24718.1255650266@redhat.com>

On Fri, 2009-10-16 at 00:44 +0100, David Howells wrote:
> Peter Zijlstra <peterz@infradead.org> wrote:
> 
> > The problem appears to be that rwsem doesn't allow lock-stealing
> 
> With good reason.  rwsems can be read or write locked for a long time - so if
> readers can jump the queue on read-locked rwsems, then writer starvation is a
> real possibility.  I carefully implemented it so that it is a strict FIFO to
> avoid certain problems I was having.

Well, it kinda sucks that rwsem is slower than a mutex.

What about allowing writer stealing when the next contending task is a
writer?


  reply	other threads:[~2009-10-17 15:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-10 14:57 Mutex vs semaphores scheduler bug Török Edwin
2009-10-12 14:53 ` Peter Zijlstra
2009-10-12 15:37   ` Török Edwin
2009-10-15 23:44   ` David Howells
2009-10-17 15:32     ` Peter Zijlstra [this message]
2009-10-20 19:02       ` Török Edwin

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=1255793527.8152.4.camel@laptop \
    --to=peterz@infradead.org \
    --cc=acab@clamav.net \
    --cc=dhowells@redhat.com \
    --cc=edwin@clamav.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=npiggin@suse.de \
    --cc=tglx@linutronix.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.