public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ulrich Drepper <drepper@redhat.com>
To: Andrew Morton <akpm@osdl.org>
Cc: inaky.perez-gonzalez@intel.com, linux-kernel@vger.kernel.org,
	robustmutexes@lists.osdl.org, rusty@rustcorp.com.au,
	mingo@elte.hu, jamie@shareable.org
Subject: Re: [RFC/PATCH] FUSYN Realtime & robust mutexes for Linux, v2.3.1
Date: Thu, 05 Aug 2004 00:37:25 -0700	[thread overview]
Message-ID: <4111E3B5.1070608@redhat.com> (raw)
In-Reply-To: <20040805001737.78afb0d6.akpm@osdl.org>

Andrew Morton wrote:

> How large is the slowdown, and on what workloads?

The fast path for all locking primitives etc in nptl today is entirely
at userlevel.  Normally just a single atomic operation with a dozen
other instructions.  With the fusyn stuff each and every locking
operation needs a system call to register/unregister the thread as it
locks/unlocks mutex/rwlocks/etc.  Go figure how well this works.  We are
talking about making the fast path of the locking primitives
two/three/four orders of magnitude more expensive.  And this for
absolutely no benefit for 99.999% of all the code which uses threads.


> Passing the lock to a non-rt task when there's an rt-task waiting for it
> seems pretty poor form, too.

No no, that's not what is wanted.  Robust mutexes are a special kind of
mutex and not related to rt issues.  Lockers of robust mutexes have to
register with the kernel (i.e., the locking must actually be performed
by the kernel) so that in case the thread goes away or the entire
process dies, the mutex is unlocked and other waiters (other threads, in
the same or other processes) can get the lock.  This is very useful for
normal operations where mutexes are used inter-process.  This is the
part which is independent from rt but it also must not be the default
mode (i.e., normal pthread_mutex_t code must not be replaced) since it
is significantly slower.


The rest of the extensions like all the priority handling is not of
general interest.  POSIX describes how a thread's priority would be
temporarily raised if it holds a mutex which has a higher-priority
waiter.  But this is all functionality of a realtime profile and widely
not part of the normal implementation.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

  reply	other threads:[~2004-08-05  7:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-04  9:13 [RFC/PATCH] FUSYN Realtime & robust mutexes for Linux, v2.3.1 Perez-Gonzalez, Inaky
2004-08-05  6:21 ` Andrew Morton
2004-08-05  7:06   ` Ulrich Drepper
2004-08-05  7:17     ` Andrew Morton
2004-08-05  7:37       ` Ulrich Drepper [this message]
2004-08-05  7:40         ` Andrew Morton
2004-08-05  8:22           ` Ulrich Drepper
2004-08-05 10:42         ` Ingo Molnar
2004-08-05 11:48         ` Rusty Russell
2004-08-05 13:23           ` Linh Dang
2004-08-05 13:26         ` Linh Dang
2004-08-05 14:02         ` Chris Friesen
2004-08-05 10:34 ` Ingo Molnar
2004-08-05 10:59   ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2004-08-05  8:39 Eric Valette
2004-08-05 18:16 Perez-Gonzalez, Inaky
2004-08-05 18:16 Perez-Gonzalez, Inaky
2004-08-05 18:16 Perez-Gonzalez, Inaky
2004-08-05 18:22 Perez-Gonzalez, Inaky
2004-08-05 18:37 Perez-Gonzalez, Inaky
2004-08-05 18:39 Perez-Gonzalez, Inaky
2004-08-05 18:39 Perez-Gonzalez, Inaky

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=4111E3B5.1070608@redhat.com \
    --to=drepper@redhat.com \
    --cc=akpm@osdl.org \
    --cc=inaky.perez-gonzalez@intel.com \
    --cc=jamie@shareable.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=robustmutexes@lists.osdl.org \
    --cc=rusty@rustcorp.com.au \
    /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