Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1594311

Re: [PATCH -v5 09/14] futex: Rework inconsistent rt_mutex/futex_q state

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH -v5 09/14] futex: Rework inconsistent rt_mutex/futex_q state
Date 2017-03-07 15:50 +0100
Message-ID <tioB5-pr-41@gated-at.bofh.it> (permalink)
References <theNr-7vq-5@gated-at.bofh.it> <theNr-7vq-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH -v5 09/14] futex: Rework inconsistent rt_mutex/futex_q state Peter Zijlstra <peterz@infradead.org> - 2017-03-04 11:10 +0100
  Re: [PATCH -v5 09/14] futex: Rework inconsistent rt_mutex/futex_q  state Thomas Gleixner <tglx@linutronix.de> - 2017-03-07 15:50 +0100

csiph-web