lkml.org 
[lkml]   [2017]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -v5 09/14] futex: Rework inconsistent rt_mutex/futex_q state
On Sat, 4 Mar 2017, Peter Zijlstra wrote:
> @@ -1402,12 +1402,18 @@ static int wake_futex_pi(u32 __user *uad
> new_owner = rt_mutex_next_owner(&pi_state->pi_mutex);
>
> /*
> - * It is possible that the next waiter (the one that brought
> - * top_waiter owner to the kernel) timed out and is no longer
> - * waiting on the lock.
> + * When we interleave with futex_lock_pi() where it does
> + * rt_mutex_timed_futex_lock(), we might observe @this futex_q waiter,
> + * but the rt_mutex's wait_list can be empty (either still, or again,
> + * depending on which side we land).
> + *
> + * When this happens, give up our locks and try again, giving the
> + * futex_lock_pi() instance time to complete and unqueue_me().

time to complete, either by waiting on the rtmutex or removing itself
from the futex queue.

Or something like that.

Thanks,

tglx

\
 
 \ /
  Last update: 2017-03-07 15:46    [W:0.195 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site