All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: sebastien.dugue@bull.net, arjan@infradead.org, mingo@redhat.com,
	linux-kernel@vger.kernel.org, pierre.peiffer@bull.net,
	Ulrich Drepper <drepper@redhat.com>
Subject: Re: NPTL mutex and the scheduling priority
Date: Thu, 7 Sep 2006 04:32:44 -0400	[thread overview]
Message-ID: <20060907083244.GA12531@devserv.devel.redhat.com> (raw)
In-Reply-To: <20060907.171158.130239448.nemoto@toshiba-tops.co.jp>

On Thu, Sep 07, 2006 at 05:11:58PM +0900, Atsushi Nemoto wrote:
> Three months after, I have tried kernel 2.6.18 with recent glibc.  I
> got desired results for pthread_mutex_unlock and
> pthread_cond_broadcast, with PI-mutex.
> 
> But pthread_cond_signal and sem_post still wakeup a thread in FIFO
> order, as you can guess.
> 
> With the plist patch (applied by hand), I can get desired behavior.
> Thank you.  But It seems the patch lacks reordering on priority
> changes.

Yes, either something like the plist patch for FUTEX_WAKE etc. or, if that
proves to be too slow for the usual case (non-RT threads), FIFO wakeup
initially and conversion to plist wakeup whenever first waiter with realtime
priority is added, is still needed.  That will cure e.g. non-PI
pthread_mutex_unlock and sem_post.  For pthread_cond_{signal,broadcast} we
need further kernel changes, so that the condvar's internal lock can be
always a PI lock.

> <off_topic>
> BTW, If I tried to create a PI mutex on a kernel without PI futex
> support, pthread_mutexattr_setprotocol(PTHREAD_PRIO_INHERIT) returned
> 0 and pthread_mutex_init() returned ENOTSUP.  This is not a right
> behavior according to the manual ...
> </off_topic>

Why?
POSIX doesn't forbid ENOTSUP in pthread_mutex_init to my knowledge.

	Jakub

  reply	other threads:[~2006-09-07  8:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-12  8:10 NPTL mutex and the scheduling priority Atsushi Nemoto
2006-06-12 12:23 ` Arjan van de Ven
2006-06-12 12:44   ` Jakub Jelinek
2006-06-12 15:24     ` Sébastien Dugué
2006-06-12 16:06       ` Atsushi Nemoto
2006-09-07  8:11         ` Atsushi Nemoto
2006-09-07  8:32           ` Jakub Jelinek [this message]
2006-09-07  9:30             ` Atsushi Nemoto
2006-09-07  9:37               ` Andreas Schwab
2006-09-07  9:42                 ` Atsushi Nemoto
2006-06-13  8:39       ` Pierre Peiffer
2006-06-13  8:48       ` Jakub Jelinek
2006-06-13 12:04         ` Sébastien Dugué
2006-06-13 12:56           ` Jakub Jelinek
2006-06-14 13:19             ` Sébastien Dugué
2006-06-14 13:28               ` Jakub Jelinek
2006-06-14 13:38               ` Pierre Peiffer
2006-06-15  9:28               ` Pierre Peiffer

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=20060907083244.GA12531@devserv.devel.redhat.com \
    --to=jakub@redhat.com \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=arjan@infradead.org \
    --cc=drepper@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pierre.peiffer@bull.net \
    --cc=sebastien.dugue@bull.net \
    /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.