public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Friesen <cfriesen@nortelnetworks.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Andrew Morton <akpm@osdl.org>,
	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 10:02:05 -0400	[thread overview]
Message-ID: <41123DDD.5040607@nortelnetworks.com> (raw)
In-Reply-To: <4111E3B5.1070608@redhat.com>

Ulrich Drepper wrote:
> 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.

Just a small clarification.  (Rusty already touched on this briefly, but I think 
he made a mistake.)

If the arch has atomic compare-and-exchange, then the non-contended case is 
entirely userspace and no syscall is needed.  I don't think that the cmpxchg 
need be 64-bit.  From the OLS 2004 talk:

int vfulock_lock (&vfulock, flags, pid, &timeout) {
	unsigned old = VFULOCK_UNLOCKED;
	if (cmpxchg(vfulock,old,pid) != old) return 0;
	return SYSCALL(ufulock_lock,3,vfulock,flags,to);
}

That looks like a 32-bit cmpxchg to me.

Also, Inaky reported general operation about 10% slower than NPTL, but said that 
he wanted to fix that if possible.

Chris

  parent reply	other threads:[~2004-08-05 14:11 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
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 [this message]
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=41123DDD.5040607@nortelnetworks.com \
    --to=cfriesen@nortelnetworks.com \
    --cc=akpm@osdl.org \
    --cc=drepper@redhat.com \
    --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