Re: [PATCH V2 0/6][RFC] futex: FUTEX_LOCK with optional adaptive spinning

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Darren Hart
Date: Monday, April 5, 2010 - 3:59 pm

Avi Kivity wrote:


No argument there, thus my proposal for an alternate configuration below.


How so? Several real world applications use one thread per CPU to 
dispatch work to, wait for events, etc.


Absolutely, I don't disagree that all the variables should vary in order 
to get a complete picture. I'm starting with 8 - it takes several hours 
to collect the data.


You really can't do this precisely. You can read the futex value at 
various points along the wakeup path, but at some point you have to 
commit to waking a task, and you still have a race between the time you 
wake_up_task() and when it is scheduled and attempts the cmpxchg itself.

-- 
Darren Hart
IBM Linux Technology Center
Real-Time Linux Team
--
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)
Re: [PATCH V2 0/6][RFC] futex: FUTEX_LOCK with optional ad ..., Darren Hart, (Mon Apr 5, 3:59 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)