From mboxrd@z Thu Jan 1 00:00:00 1970 From: Davidlohr Bueso Subject: Re: Revised futex(2) man page for review Date: Tue, 31 Mar 2015 13:36:45 -0700 Message-ID: <1427834205.20009.19.camel@stgolabs.net> References: <55166C01.7000803@gmail.com> <20150328114725.GJ27490@worktop.programming.kicks-ass.net> <20150328120337.GB32047@worktop.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20150328120337.GB32047-IIpfhp3q70xoDWY/xQGDymt3HXsI98Cx0E9HWUfgJXw@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Peter Zijlstra Cc: "Michael Kerrisk (man-pages)" , Thomas Gleixner , Darren Hart , Carlos O'Donell , Ingo Molnar , Jakub Jelinek , "linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , lkml , Arnd Bergmann , Steven Rostedt , Linux API , Torvald Riegel , Roland McGrath , Darren Hart , Anton Blanchard , Eric Dumazet , bill o gallmeister , Jan Kiszka , Daniel Wagner , Rich Felker , Andy Lutomirski , bert hubert , Rusty Russell List-Id: linux-api@vger.kernel.org On Sat, 2015-03-28 at 13:03 +0100, Peter Zijlstra wrote: > > If the timeout argument is non-NULL, its contents spe= cify a rel=E2=80=90 > > ative timeout for the wait, measured accordi= ng to the > > CLOCK_MONOTONIC clock. (This interval will be rounde= d up to the > > system clock granularity, and kernel scheduling delay= s mean that > > the blocking interval may overrun by a small amount.)= If time=E2=80=90 > > out is NULL, the call blocks indefinitely. >=20 > Would it not be better to only state that the wait will not return > before the timeout -- unless woken -- and not bother with clock > granularity and scheduling delays? Yeah, similarly we also have this: FUTEX_PRIVATE_FLAG (since Linux 2.6.22) This option bit can be employed with all futex operation= s. It tells the kernel that the futex is process-private = and not shared with another process (i.e., it is only being us= ed for synchronization between threads of the same process)= =2E This allows the kernel to choose the fast path for validati= ng the user-space address and avoids expensive VMA lookups, taki= ng ref=E2=80=90 erence counts on file backing store, and so on. This to me reads a bit too much into the kernel (fastpath, refcnt, vmas). Why not just mention that it avoids overhead in the kernel or something? I don't recall any manpage mentioning such details, but I could be wrong. In any case its a nit, the whole doc is pretty good and I hope you can merge it soon and then just increment ;) Thanks, Davidlohr