From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757224AbbA0Hsh (ORCPT ); Tue, 27 Jan 2015 02:48:37 -0500 Received: from mail-wi0-f170.google.com ([209.85.212.170]:49701 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751544AbbA0Hsf (ORCPT ); Tue, 27 Jan 2015 02:48:35 -0500 Message-ID: <54C742CC.6030409@gmail.com> Date: Tue, 27 Jan 2015 08:48:28 +0100 From: "Michael Kerrisk (man-pages)" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Torvald Riegel , Thomas Gleixner CC: mtk.manpages@gmail.com, "Carlos O'Donell" , Darren Hart , Ingo Molnar , Jakub Jelinek , "linux-man@vger.kernel.org" , lkml , Arnd Bergmann , Steven Rostedt , Peter Zijlstra , Linux API , Darren Hart , Anton Blanchard , Eric Dumazet , bill o gallmeister , Jan Kiszka , Daniel Wagner , Rich Felker Subject: Re: futex(2) man page update help request References: <537346E5.4050407@gmail.com> <5373D0CA.2050204@redhat.com> <54B7D87C.3090901@gmail.com> <1422037788.29655.0.camel@triegel.csb> <1422105142.29655.16.camel@triegel.csb> In-Reply-To: <1422105142.29655.16.camel@triegel.csb> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Torvald, On 01/24/2015 02:12 PM, Torvald Riegel wrote: > On Sat, 2015-01-24 at 12:35 +0100, Thomas Gleixner wrote: >> So we should never see -EINTR in the case of a spurious wakeup here. >> >> But, here is the not so good news: >> >> I did some archaeology. The restart handling of futex_wait() got >> introduced in kernel 2.6.22, so anything older than that will have >> the spurious -EINTR issues. >> >> futex_wait_pi() always had the restart handling and glibc folks back >> then (2006) requested that it should never return -EINTR, so it >> unconditionally restarts the syscall whether a signal had been >> delivered or not. >> >> So kernels >= 2.6.22 should never return -EINTR spuriously. If that >> happens it's a bug and needs to be fixed. > > Thanks for looking into this. > > Michael, can you include the above in the documentation please? This is > useful for userspace code like glibc that expects a minimum kernel > version. Thanks! I've added some text to my draft to cover this point. Cheers, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/