From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756041AbbAWSU2 (ORCPT ); Fri, 23 Jan 2015 13:20:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60631 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751879AbbAWSUZ (ORCPT ); Fri, 23 Jan 2015 13:20:25 -0500 Subject: Re: futex(2) man page update help request From: Torvald Riegel To: Darren Hart Cc: "Michael Kerrisk (man-pages)" , Thomas Gleixner , "Carlos O'Donell" , Ingo Molnar , Jakub Jelinek , "linux-man@vger.kernel.org" , lkml , Davidlohr Bueso , Arnd Bergmann , Steven Rostedt , Peter Zijlstra , Linux API , Darren Hart , Anton Blanchard , Petr Baudis , Eric Dumazet , bill o gallmeister , Jan Kiszka , Daniel Wagner , Rich Felker In-Reply-To: References: <537346E5.4050407@gmail.com> <5373D0CA.2050204@redhat.com> <54B7D87C.3090901@gmail.com> <54B92B71.2090509@gmail.com> <54B97A72.2050205@gmail.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 23 Jan 2015 19:19:05 +0100 Message-ID: <1422037145.27573.0.camel@triegel.csb> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2015-01-16 at 16:46 -0800, Darren Hart wrote: > On 1/16/15, 12:54 PM, "Michael Kerrisk (man-pages)" > wrote: > > >Color me stupid, but I can't see this in futex_requeue(). Where is that > >check that is "independent of the requeue type (normal/pi)"? > > > >When I look through futex_requeue(), all the likely looking sources > >of EINVAL are governed by a check on the 'requeue_pi' argument. > > > Right, in the non-PI case, I believe there are valid use cases: move to > the back of the FIFO, for example (OK, maybe the only example?). But we never guarantee a futex is a FIFO, or do we? If we don't, then such a requeue could be implemented as a no-op by the kernel, which would sort of invalidate the use case. (And I guess we don't want to guarantee FIFO behavior for futexes.)