linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: "Kim H. Madsen" <kim@undo.dk>
Cc: linux-rt-users@vger.kernel.org, John Kacur <jkacur@redhat.com>
Subject: Re: priority inheritance on kernel semaphore?
Date: Fri, 7 Feb 2014 18:03:22 +0100	[thread overview]
Message-ID: <20140207170322.GE2382@linutronix.de> (raw)
In-Reply-To: <20140129070736.78924D6CCE2A@bmail06.one.com>

* Kim H. Madsen | 2014-01-29 08:07:36 [+0100]:

>According to <https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO> the
>preempt-rt patch is "Implementing priority inheritance for in-kernel
>spinlocks and semaphores.".
>
>Testing this on 2.6.33.7-rt29 and 3.4.37-rt51 using up()/down() seems to
>give another result? PI works fine when using rt_mutex instead in the test. Have I
>failed in the testing/configuration or is the documentation out of date?

The documentation is partly out of date. In the "early" days we had
boosting for semaphores. Later (once the semaphore users were not that
important / critical) the whole owner tracking part got removed and so
we do not have priority boosting for semaphores anymore.

There are also reader/write semaphores (rw_semaphore) and this is
almost mapped to a mutexe (there is a difference a small difference).
Here we have owner tracking and PI on -RT. The price for this is that
you can't have >1 simultaneous readers on a rw_semaphore on -RT.

So spin_lock, mutex and rw_semaphore should give you PI, plain
semaphores don't.

John, could you please update the wiki?

>- Kim--

Sebastian

      reply	other threads:[~2014-02-07 17:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29  7:07 priority inheritance on kernel semaphore? Kim H. Madsen
2014-02-07 17:03 ` Sebastian Andrzej Siewior [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=20140207170322.GE2382@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=jkacur@redhat.com \
    --cc=kim@undo.dk \
    --cc=linux-rt-users@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).