linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislav Meduna <stano@meduna.org>
To: "linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>
Subject: Priority inheritance?
Date: Mon, 29 Oct 2012 14:00:34 +0100	[thread overview]
Message-ID: <508E7DF2.1040301@meduna.org> (raw)

Hi,

strictly speaking not a linux-rt specific questions but I think
that the folks here have the needed experience and knowledge:
what is the relation of
  pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
and scheduler class used for a particular thread? Does the priority
inheritance work across all threads in the system or is it limited
to one scheduling class?

Specifically: my application has some SCHED_RR threads with fixed
priorities and realtime needs and a few that are quite low-prio,
actually have the SCHED_OTHER semantics and I don't want them
to count against the time spent in RT (keyword: throttler).

I need to occasionally queue data from from the RT-ones to
the low-prio ones, so for short periods of time I need to lock
a mutex. With it comes the question of priority inversion.

Can I leave the low-prio threads at SCHED_OTHER and rely on
the PTHREAD_PRIO_INHERIT to boost their priority in case they
were preempted with the lock held and the RT-thread needs
to lock it too, or do they have to be SCHED_RR too?

Thanks
-- 
                                    Stano

             reply	other threads:[~2012-10-29 13:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-29 13:00 Stanislav Meduna [this message]
2012-10-29 23:38 ` Priority inheritance? Thomas Gleixner

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=508E7DF2.1040301@meduna.org \
    --to=stano@meduna.org \
    --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).