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


Groups > linux.kernel > #1543857

Re: [PATCH -v4 03/10] futex: Cleanup variable names for futex_top_waiter()

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Darren Hart <dvhart@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH -v4 03/10] futex: Cleanup variable names for futex_top_waiter()
Date Sat, 17 Dec 2016 01:20:01 +0100
Message-ID <sPaTf-2bJ-9@gated-at.bofh.it> (permalink)
References <sNRfX-7LI-3@gated-at.bofh.it> <sNRfY-7LI-43@gated-at.bofh.it>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.7.1 (2016-10-04)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 41
Organization linux.* mail to news gateway
X-Original-Cc tglx@linutronix.de, mingo@kernel.org, juri.lelli@arm.com, rostedt@goodmis.org, xlpang@redhat.com, bigeasy@linutronix.de, linux-kernel@vger.kernel.org, mathieu.desnoyers@efficios.com, jdesfossez@efficios.com, bristot@redhat.com
X-Original-Date Fri, 16 Dec 2016 16:13:10 -0800
X-Original-Message-ID <20161217001310.GF62123@f23x64.localdomain>
X-Original-References <20161213083638.938898295@infradead.org> <20161213085730.211285865@infradead.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1543857

Show key headers only | View raw


On Tue, Dec 13, 2016 at 09:36:41AM +0100, Peter Zijlstra wrote:
> futex_top_waiter() returns the top-waiter on the pi_mutex. Assinging
> this to a variable 'match' totally obscures the code.
> 

Yes please.

One wording nit...

> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
>  kernel/futex.c |   30 +++++++++++++++---------------
>  1 file changed, 15 insertions(+), 15 deletions(-)
> 
> --- a/kernel/futex.c
> +++ b/kernel/futex.c

> @@ -1317,11 +1317,11 @@ static int wake_futex_pi(u32 __user *uad
>  
>  	/*
>  	 * It is possible that the next waiter (the one that brought
> -	 * this owner to the kernel) timed out and is no longer
> +	 * top_waiter owner to the kernel) timed out and is no longer
>  	 * waiting on the lock.
>  	 */

This breaks my parser (and did before too).

Consider:

/*
 * It is possible that the next waiter (that caused top_waiter to call
 * into the kernel) has since timed out and is no longer waiting on the
 * lock.
 */

Is that clearer?

-- 
Darren Hart
Intel Open Source Technology Center

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


Thread

[PATCH -v4 00/10] FUTEX_UNLOCK_PI wobbles Peter Zijlstra <peterz@infradead.org> - 2016-12-13 10:10 +0100
  [PATCH -v4 08/10] futex: Rework futex_lock_pi() vs rt_mutex_timed_futex_lock() Peter Zijlstra <peterz@infradead.org> - 2016-12-13 10:10 +0100
  [PATCH -v4 06/10] futex,rt_mutex: Provide futex specific rt_mutex API Peter Zijlstra <peterz@infradead.org> - 2016-12-13 10:10 +0100
  [PATCH -v4 03/10] futex: Cleanup variable names for futex_top_waiter() Peter Zijlstra <peterz@infradead.org> - 2016-12-13 10:10 +0100
    Re: [PATCH -v4 03/10] futex: Cleanup variable names for  futex_top_waiter() Darren Hart <dvhart@infradead.org> - 2016-12-17 01:20 +0100
  Re: [PATCH -v4 00/10] FUTEX_UNLOCK_PI wobbles Peter Zijlstra <peterz@infradead.org> - 2016-12-13 17:10 +0100
  Re: [PATCH -v4 00/10] FUTEX_UNLOCK_PI wobbles Darren Hart <dvhart@infradead.org> - 2016-12-17 00:40 +0100
    Re: [PATCH -v4 00/10] FUTEX_UNLOCK_PI wobbles Peter Zijlstra <peterz@infradead.org> - 2016-12-17 15:00 +0100
      Re: [PATCH -v4 00/10] FUTEX_UNLOCK_PI wobbles Darren Hart <dvhart@infradead.org> - 2016-12-18 23:40 +0100

csiph-web