Re: [PATCH 4/6] futex: Add FUTEX_LOCK with optional adaptive spinning

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Thomas Gleixner
Date: Wednesday, April 7, 2010 - 12:59 pm

On Wed, 7 Apr 2010, Darren Hart wrote:

Well, you need a first time lookup of owner and ownertid for which you
need the user space value (uval), but thinking more about it it's not
even necessary. Just initialize ownertid to 0 so it will drop into the
lookup code when we did not acquire the futex in the cmpxchg.
 

I don't care either way. That was just example code.
 

Why ? If the owner has changed and the new owner is running on another
cpu then why not spin further ?


Hmm, ok.
 

AFAICT p->oncpu is the correct thing to use when CONFIG_SMP=y. All it
needs is a simple accessor function and you can keep all the futex
cruft in futex.c where it belongs.

Thanks,

	tglx
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 2/6] futex: add futex_q static initializer, Darren Hart, (Mon Apr 5, 1:23 pm)
[PATCH 3/6] futex: refactor futex_lock_pi_atomic, Darren Hart, (Mon Apr 5, 1:23 pm)
[No subject], Ulrich Drepper, (Tue Apr 6, 7:47 am)
[No subject], Peter Zijlstra, (Tue Apr 6, 7:51 am)
[No subject], Darren Hart, (Tue Apr 6, 8:28 am)
[No subject], Peter Zijlstra, (Tue Apr 6, 8:29 am)
[No subject], Darren Hart, (Tue Apr 6, 8:33 am)
[No subject], Peter Zijlstra, (Tue Apr 6, 8:37 am)
[No subject], Avi Kivity, (Tue Apr 6, 9:06 am)
[No subject], Avi Kivity, (Tue Apr 6, 9:10 am)
[No subject], Thomas Gleixner, (Tue Apr 6, 9:14 am)
[No subject], Avi Kivity, (Tue Apr 6, 9:20 am)
[No subject], Alan Cox, (Tue Apr 6, 9:44 am)
[No subject], Alan Cox, (Tue Apr 6, 9:53 am)
[No subject], Alan Cox, (Tue Apr 6, 9:54 am)
[No subject], Thomas Gleixner, (Tue Apr 6, 9:55 am)
[No subject], Ulrich Drepper, (Tue Apr 6, 10:34 am)
Re: [PATCH 4/6] futex: Add FUTEX_LOCK with optional adapti ..., Thomas Gleixner, (Wed Apr 7, 12:59 pm)